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