com.ca.commons.datamodel
Class DataModelEnumDef.Simple

java.lang.Object
  extended by com.ca.commons.datamodel.DataModelEnumDef.Simple
All Implemented Interfaces:
DataModelEnumDef, Serializable
Enclosing interface:
DataModelEnumDef

public static final class DataModelEnumDef.Simple
extends Object
implements DataModelEnumDef, Serializable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ca.commons.datamodel.DataModelEnumDef
DataModelEnumDef.Simple
 
Constructor Summary
DataModelEnumDef.Simple(String name, Collection<? extends DataModelEnumValue> values)
           
 
Method Summary
 String getName()
           
 DataModelEnumValue getValueByName(String name)
          Look-up based on symbolic enum value.
 DataModelEnumValue getValueByOrdinal(int i)
          Look-up based on enum ordinal value.
 Collection<? extends DataModelEnumValue> getValues()
           
 Collection<String> getValuesStrings()
           
 boolean isValueName(String name)
          Return true if provided name is one of contained symbolic enum values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataModelEnumDef.Simple

public DataModelEnumDef.Simple(String name,
                               Collection<? extends DataModelEnumValue> values)
Method Detail

getName

@NotNull
public String getName()
Specified by:
getName in interface DataModelEnumDef

isValueName

public boolean isValueName(String name)
Description copied from interface: DataModelEnumDef
Return true if provided name is one of contained symbolic enum values.

Specified by:
isValueName in interface DataModelEnumDef

getValueByName

@NotNull
public DataModelEnumValue getValueByName(String name)
Description copied from interface: DataModelEnumDef
Look-up based on symbolic enum value.

Specified by:
getValueByName in interface DataModelEnumDef

getValueByOrdinal

@NotNull
public DataModelEnumValue getValueByOrdinal(int i)
Description copied from interface: DataModelEnumDef
Look-up based on enum ordinal value.

Specified by:
getValueByOrdinal in interface DataModelEnumDef

getValues

@NotNull
public Collection<? extends DataModelEnumValue> getValues()
Specified by:
getValues in interface DataModelEnumDef

getValuesStrings

@NotNull
public Collection<String> getValuesStrings()
Specified by:
getValuesStrings in interface DataModelEnumDef
Returns:
Array of legal enum values.


Created 2011-07-14 13:27 EST