Class LabelValueBean

java.lang.Object
org.apache.struts.util.LabelValueBean
All Implemented Interfaces:
Serializable, Comparable<LabelValueBean>

public class LabelValueBean extends Object implements Comparable<LabelValueBean>, 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.

Version:
$Rev$ $Date: 2005-05-07 12:11:38 -0400 (Sat, 07 May 2005) $
See Also:
  • Field Details

    • CASE_INSENSITIVE_ORDER

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

    • LabelValueBean

      public LabelValueBean()
      Default constructor.
    • LabelValueBean

      public LabelValueBean(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.
  • Method Details