org.jibx.schema.types
Class AllEnumSet

java.lang.Object
  extended by org.jibx.schema.types.AllEnumSet

public class AllEnumSet
extends Object

Bit set based on a string enumeration list with the added option of '#all'.

Author:
Dennis M. Sosnoski

Constructor Summary
AllEnumSet(EnumSet eset, String name)
          Constructor.
 
Method Summary
 void add(int value)
          Add value to set.
 void fromString(String text, ValidationContext vctx, Object obj)
          Deserializer method for input as value list.
 boolean isAll()
          Check '#all' value.
 boolean isPresent()
          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.
 String toString()
          Serializer method for output as value list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AllEnumSet

public AllEnumSet(EnumSet eset,
                  String name)
Constructor.

Parameters:
eset - enumeration value set
name - attribute name
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:
true if 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 String toString()
Serializer method for output as value list.

Overrides:
toString in class Object
Returns:
string value, or null if not present

fromString

public void fromString(String text,
                       ValidationContext vctx,
                       Object obj)
Deserializer method for input as value list.

Parameters:
text - string value, or null if not present
vctx -
obj - object being validated


Copyright © 2005-2012 jibx.org. All Rights Reserved.