public class Count
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Count |
COUNT_ONE
Predefined count of '1'.
|
static Count |
COUNT_UNBOUNDED
Predefined count of 'unbounded'.
|
static Count |
COUNT_ZERO
Predefined count of '0'.
|
private int |
m_count
Actual count for bounded value.
|
private boolean |
m_unbounded
Flag for unbounded value.
|
Modifier | Constructor and Description |
---|---|
private |
Count(int count,
boolean unbounded)
Internal constructor.
|
Modifier and Type | Method and Description |
---|---|
static Count |
getBoundedCount(java.lang.String value)
Deserializer method for bounded values.
|
int |
getCount()
Get count value.
|
static Count |
getCount(java.lang.String value)
Deserializer method.
|
static boolean |
isCountEqual(int value,
Count count)
Check if a count attribute is equal to a specified value.
|
boolean |
isEqual(int value)
Check for count equal to a particular value.
|
boolean |
isGreaterThan(int value)
Check for count greater than a particular value.
|
boolean |
isUnbounded()
Check for unbounded count.
|
java.lang.String |
toString()
Conversion to text form.
|
public static final Count COUNT_ZERO
public static final Count COUNT_ONE
public static final Count COUNT_UNBOUNDED
private final int m_count
private final boolean m_unbounded
private Count(int count, boolean unbounded)
count
- unbounded
- public int getCount()
isUnbounded()
first.public boolean isUnbounded()
public boolean isEqual(int value)
value
- public boolean isGreaterThan(int value)
value
- public static Count getBoundedCount(java.lang.String value) throws JiBXException
value
- text representationJiBXException
- on conversion errorpublic static Count getCount(java.lang.String value) throws JiBXException
value
- text representationnull
if none)JiBXException
- on conversion errorpublic static boolean isCountEqual(int value, Count count)
null
, the value is
taken as '1'.value
- count
- true
if value equal, false
if notpublic java.lang.String toString()
toString
in class java.lang.Object