|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.zeus.transform.ValueEnumeration
ValueEnumeration
represents a set of allowed values for a
class or other construct to be allowed to take on. Even though the values
may ultimately be represented by Java int
s,
Date
s, or other non-character-based types, all data in this
class is represented by Java String
s, and later converted
to appropriate types.
Constructor Summary | |
ValueEnumeration(java.lang.String name)
Default constructor. |
|
ValueEnumeration(java.lang.String name,
java.util.List allowedValues)
This constructor creates a new ValueEnumeration using
the supplied List to seed the allowed values. |
Method Summary | |
void |
addAllowedValue(java.lang.String allowedValue)
This will add a new allowed value to the current list. |
java.util.List |
getAllowedValues()
This returns the current list of allowed values. |
java.lang.String |
getName()
This will return the current name of this ValueEnumeration . |
boolean |
isAllowedValue(java.lang.String value)
This will indicate if the supplied value is allowed for this ValueEnumeration . |
void |
removeAllowedValue(java.lang.String removedValue)
This will remove the specified value from the current list. |
void |
setAllowedValues(java.util.List allowedValues)
This sets the list of allowed values to the supplied List . |
void |
setName(java.lang.String name)
This will set the name of this ValueEnumeration . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ValueEnumeration(java.lang.String name)
Default constructor.
name
- the name of this enumeration.public ValueEnumeration(java.lang.String name, java.util.List allowedValues)
This constructor creates a new ValueEnumeration
using
the supplied List
to seed the allowed values.
name
- the name of this enumeration.allowedValue
- initial values to allow for this enumeration.Method Detail |
public void setName(java.lang.String name)
This will set the name of this ValueEnumeration
.
name
- the name for this enumerationpublic java.lang.String getName()
This will return the current name of this ValueEnumeration
.
String
- the name of this enumeration.public void setAllowedValues(java.util.List allowedValues)
This sets the list of allowed values to the supplied List
.
Any existing allowed values are replaced. If any value is allowed,
the null
value should be supplied here.
allowedValues
- the values to allow for this enumeration.public java.util.List getAllowedValues()
This returns the current list of allowed values.
List
- the list of allowed values.public void addAllowedValue(java.lang.String allowedValue)
This will add a new allowed value to the current list.
allowedValue
- the new value to allowpublic void removeAllowedValue(java.lang.String removedValue)
This will remove the specified value from the current list.
removedValue
- the value to remove from the enumeration.public boolean isAllowedValue(java.lang.String value)
This will indicate if the supplied value is allowed for this
ValueEnumeration
.
Note that this operation is case-sensitive; while this is not relevant if the data is numerical or non-character-based, it will affect this operation on character-based values.
value
- the value to check for legality in this enumeration.boolean
- whether the supplied value is allowed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |