public class LabelValueBean extends Object implements Comparable, Serializable
<html:options>
tag.
Note: this class has a natural ordering that is inconsistent with equals.
Modifier and Type | Field and Description |
---|---|
static Comparator |
CASE_INSENSITIVE_ORDER
Comparator that can be used for a case insensitive sort of
LabelValueBean objects. |
Constructor and Description |
---|
LabelValueBean()
Default constructor.
|
LabelValueBean(String label,
String value)
Construct an instance with the supplied property values.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public static final Comparator CASE_INSENSITIVE_ORDER
LabelValueBean
objects.public String getLabel()
public void setLabel(String label)
public String getValue()
public void setValue(String value)
public int compareTo(Object o)
compareTo
in interface Comparable
Comparable
public String toString()
public boolean equals(Object obj)
equals
in class Object
Object.equals(Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
Copyright © 2000–2017 Apache Software Foundation. All rights reserved.