Class 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 Detail

      • CASE_INSENSITIVE_ORDER

        public static final Comparator<LabelValue> CASE_INSENSITIVE_ORDER
        Comparator that can be used for a case insensitive sort of LabelValue objects.
    • Constructor Detail

      • LabelValue

        public LabelValue()
        Default constructor.
      • LabelValue

        public LabelValue​(String label,
                          String value)
        Construct an instance with the supplied property values.
        Parameters:
        label - The label to be displayed to the user
        value - The value to be returned to the server