com.xerox.bantam
Class EnumeratedType
java.lang.Object
|
+--com.xerox.bantam.ClassTypeDescriptor
|
+--com.xerox.bantam.EnumeratedType
- All Implemented Interfaces:
- Serializable, TypeDescriptor
- public class EnumeratedType
- extends ClassTypeDescriptor
TypeDescriptor for value types that are particular enumerated subsets of
values of a Java class.
- Version:
- $Revision: 1.4 $, $Date: 2000/03/14 18:31:59 $
- Author:
- Tom Rodriguez
- See Also:
- Serialized Form
members
protected ArrayList members
- The values in this enumerated type.
EnumeratedType
public EnumeratedType(Class clazz)
contains
public boolean contains(Object item)
- Description copied from class:
ClassTypeDescriptor
- return true if the item is in the type
- Overrides:
contains in class ClassTypeDescriptor
possibleValues
public Collection possibleValues()
- Description copied from class:
ClassTypeDescriptor
- return null if the possible values can't be enumerated.
- Overrides:
possibleValues in class ClassTypeDescriptor
description
public String description()
- Description copied from class:
ClassTypeDescriptor
- return a string describing the possible values, suitable for
an error message or other guidance to the user
- Overrides:
description in class ClassTypeDescriptor
parse
public Object parse(String name)
- Description copied from class:
ClassTypeDescriptor
- Try to do something reasonable with the string passed in.
return null if that is not possible
- Overrides:
parse in class ClassTypeDescriptor
addValue
public void addValue(Object member)
toString
public String toString()
- Overrides:
toString in class ClassTypeDescriptor