Package org.jibx.schema.types
Class AllEnumSet
java.lang.Object
org.jibx.schema.types.AllEnumSet
Bit set based on a string enumeration list with the added option of '#all'.
- Author:
- Dennis M. Sosnoski
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Flag for '#all' value.private final ShortBitSet
Bit set for values from enumeration.private final EnumSet
Base enumeration.private final String
Attribute name.private boolean
Flag for present (iffalse
, other values ignored). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int value) Add value to set.private void
addName
(String name, ValidationContext vctx, Object obj) Process name from text list.private void
fromString
(String text, IUnmarshallingContext ictx) Deserializer method for unmarshalling input as value list.void
fromString
(String text, ValidationContext vctx, Object obj) Deserializer method for input as value list.boolean
isAll()
Check '#all' value.boolean
Check if present.boolean
isSet
(int value) Check if value in set.void
remove
(int value) Remove value from set.void
setAll
(boolean all) Set '#all' value.void
setPresent
(boolean present) Set present.toString()
Serializer method for output as value list.
-
Field Details
-
m_enum
Base enumeration. -
m_name
Attribute name. -
m_bits
Bit set for values from enumeration. -
m_present
private boolean m_presentFlag for present (iffalse
, other values ignored). -
m_all
private boolean m_allFlag for '#all' value.
-
-
Constructor Details
-
AllEnumSet
Constructor.- Parameters:
eset
- enumeration value setname
- attribute name
-
AllEnumSet
private AllEnumSet()
-
-
Method Details
-
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:
-
isSet
public boolean isSet(int value) Check if value in set.- Parameters:
value
-- Returns:
true
if value in set- See Also:
-
remove
public void remove(int value) Remove value from set.- Parameters:
value
-- See Also:
-
toString
Serializer method for output as value list. -
fromString
Deserializer method for input as value list.- Parameters:
text
- string value, ornull
if not presentvctx
-obj
- object being validated
-
fromString
Deserializer method for unmarshalling input as value list.- Parameters:
text
- string value, ornull
if not presentictx
-
-
addName
Process name from text list. This validates the name and adds it to the bit set.- Parameters:
name
-vctx
-obj
-
-