| |
|
| java.lang.Object com.jcorporate.expresso.core.dbobj.ValidValue
All known Subclasses: com.jcorporate.expresso.core.dbobj.ISOValidValue,
ValidValue | public class ValidValue implements Cacheable,Cloneable(Code) | | A valid value is a enumerated collection very similar to a pure
Struts label and value bean. It typically represent an item of data
that is displayed in a drop-down list box or a menu selection.
A valid value has a real value as known as a key and description.
To support internationalisation (i18n) the look at the subclass
ISOValidValue .
This class also contains two very useful static inner classes
ValueComparator and
DescriptionComparator , which are useful for supporting
Java collection objects that contain ValidValue types.
author: Peter A. Pilgrim, Fri Dec 27 22:33:27 GMT 2002 version: $Id: ValidValue.java,v 1.14 2004/11/18 02:03:27 lhamel Exp $ See Also: ISOValidValue |
Constructor Summary | |
public | ValidValue() Default constructor for creating a valid value. | public | ValidValue(String newValue, String newDescrip) Original constructor for creating a valid value. |
ValidValue | public ValidValue()(Code) | | Default constructor for creating a valid value.
Please note: no canonization takes place within this method.
|
ValidValue | public ValidValue(String newValue, String newDescrip)(Code) | | Original constructor for creating a valid value.
Please note: no canonization takes place within this method.
Parameters: newValue - the real value of the enumeration Parameters: newDescrip - the description of the enumeration |
equals | public boolean equals(Object obj)(Code) | | Indicates whether some other object is "equal to" this one.
Parameters: obj - the reference object with which to compare. true if this object is the same as the objargument; false otherwise. |
getDescription | public String getDescription()(Code) | | Gets the description of the valid value
the description |
hashCode | public int hashCode()(Code) | | Hashcode since we store by key
integer |
setDescription | public void setDescription(String newDescription)(Code) | | Sets the real description of the valid value
Parameters: newDescription - the new description string See Also: ValidValue.getDescription |
setValue | public void setValue(String newValue)(Code) | | Sets the real value of the valid value
Parameters: newValue - the new value string See Also: ValidValue.getValue |
toString | public String toString()(Code) | | Human readable string for debugging
String |
|
|
|