Package ubic.gemma.web.util
Class LabelValue
- java.lang.Object
-
- ubic.gemma.web.util.LabelValue
-
- All Implemented Interfaces:
Serializable
,Comparable<LabelValue>
public class LabelValue extends Object implements Comparable<LabelValue>, Serializable
A simple JavaBean to represent label-value pairs. This is most commonly used when constructing user interface elements which have a label to be displayed to the user, and a corresponding value to be returned to the server. One example is the<html:options>
tag. Note: this class has a natural ordering that is inconsistent with equals.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator<LabelValue>
CASE_INSENSITIVE_ORDER
Comparator that can be used for a case insensitive sort ofLabelValue
objects.
-
Constructor Summary
Constructors Constructor Description LabelValue()
Default constructor.LabelValue(String label, String value)
Construct an instance with the supplied property values.
-
-
-
Field Detail
-
CASE_INSENSITIVE_ORDER
public static final Comparator<LabelValue> CASE_INSENSITIVE_ORDER
Comparator that can be used for a case insensitive sort ofLabelValue
objects.
-
-
Method Detail
-
compareTo
public int compareTo(LabelValue o)
- Specified by:
compareTo
in interfaceComparable<LabelValue>
-
getLabel
public String getLabel()
-
setLabel
public void setLabel(String label)
-
getValue
public String getValue()
-
setValue
public void setValue(String value)
-
-