org.apache.struts.util
public class LabelValueBean extends Object implements Comparable, Serializable
<html:options> tag.
Note: this class has a natural ordering that is inconsistent with equals.
Version: $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $
| Field Summary | |
|---|---|
| static Comparator | CASE_INSENSITIVE_ORDER
Comparator that can be used for a case insensitive sort of
LabelValueBean objects. |
| String | label
The property which supplies the option label visible to the end user. |
| String | value
The property which supplies the value returned to the server. |
| Constructor Summary | |
|---|---|
| LabelValueBean()
Default constructor. | |
| LabelValueBean(String label, String value)
Construct an instance with the supplied property values.
| |
| Method Summary | |
|---|---|
| int | compareTo(Object o)
Compare LabelValueBeans based on the label, because that's the human
viewable part of the object. |
| boolean | equals(Object obj)
LabelValueBeans are equal if their values are both null or equal. |
| String | getLabel() |
| String | getValue() |
| int | hashCode()
The hash code is based on the object's value. |
| void | setLabel(String label) |
| void | setValue(String value) |
| String | toString()
Return a string representation of this object. |
LabelValueBean objects.Parameters: label The label to be displayed to the user. value The value to be returned to the server.
See Also: Comparable
See Also: java.lang.Object#equals(java.lang.Object)
See Also: java.lang.Object#hashCode()