Package org.jibx.schema.types
Class AllEnumSet
- java.lang.Object
-
- org.jibx.schema.types.AllEnumSet
-
public class AllEnumSet extends java.lang.ObjectBit set based on a string enumeration list with the added option of '#all'.- Author:
- Dennis M. Sosnoski
-
-
Field Summary
Fields Modifier and Type Field Description private booleanm_allFlag for '#all' value.private ShortBitSetm_bitsBit set for values from enumeration.private EnumSetm_enumBase enumeration.private java.lang.Stringm_nameAttribute name.private booleanm_presentFlag for present (iffalse, other values ignored).
-
Constructor Summary
Constructors Modifier Constructor Description privateAllEnumSet()AllEnumSet(EnumSet eset, java.lang.String name)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int value)Add value to set.private voidaddName(java.lang.String name, ValidationContext vctx, java.lang.Object obj)Process name from text list.private voidfromString(java.lang.String text, IUnmarshallingContext ictx)Deserializer method for unmarshalling input as value list.voidfromString(java.lang.String text, ValidationContext vctx, java.lang.Object obj)Deserializer method for input as value list.booleanisAll()Check '#all' value.booleanisPresent()Check if present.booleanisSet(int value)Check if value in set.voidremove(int value)Remove value from set.voidsetAll(boolean all)Set '#all' value.voidsetPresent(boolean present)Set present.java.lang.StringtoString()Serializer method for output as value list.
-
-
-
Field Detail
-
m_enum
private final EnumSet m_enum
Base enumeration.
-
m_name
private final java.lang.String m_name
Attribute name.
-
m_bits
private final ShortBitSet m_bits
Bit set for values from enumeration.
-
m_present
private boolean m_present
Flag for present (iffalse, other values ignored).
-
m_all
private boolean m_all
Flag for '#all' value.
-
-
Constructor Detail
-
AllEnumSet
public AllEnumSet(EnumSet eset, java.lang.String name)
Constructor.- Parameters:
eset- enumeration value setname- attribute name
-
AllEnumSet
private AllEnumSet()
-
-
Method Detail
-
isPresent
public boolean isPresent()
Check if present.- Returns:
- present
-
setPresent
public void setPresent(boolean present)
Set present.- Parameters:
present-
-
isAll
public boolean isAll()
Check '#all' value.- Returns:
- all
-
setAll
public void setAll(boolean all)
Set '#all' value.- Parameters:
all-
-
add
public void add(int value)
Add value to set.- Parameters:
value-- See Also:
ShortBitSet.add(int)
-
isSet
public boolean isSet(int value)
Check if value in set.- Parameters:
value-- Returns:
trueif value in set- See Also:
ShortBitSet.isSet(int)
-
remove
public void remove(int value)
Remove value from set.- Parameters:
value-- See Also:
ShortBitSet.remove(int)
-
toString
public java.lang.String toString()
Serializer method for output as value list.- Overrides:
toStringin classjava.lang.Object- Returns:
- string value, or
nullif not present
-
fromString
public void fromString(java.lang.String text, ValidationContext vctx, java.lang.Object obj)Deserializer method for input as value list.- Parameters:
text- string value, ornullif not presentvctx-obj- object being validated
-
fromString
private void fromString(java.lang.String text, IUnmarshallingContext ictx)Deserializer method for unmarshalling input as value list.- Parameters:
text- string value, ornullif not presentictx-
-
addName
private void addName(java.lang.String name, ValidationContext vctx, java.lang.Object obj)Process name from text list. This validates the name and adds it to the bit set.- Parameters:
name-vctx-obj-
-
-