public class NameValue<T> extends Object implements Comparable<NameValue<T>>, Serializable
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(NameValue<T> that)
Compares two
NameValue instances. |
boolean |
equals(Object obj)
Two
NameValue instances are considered equal if both
name and value components are equal. |
String |
getName() |
T |
getValue() |
int |
hashCode() |
String |
toString()
Returns the string representation of this object, in the form
[NAME=VALUE]. |
public String getName()
public T getValue()
public final boolean equals(Object obj)
NameValue instances are considered equal if both
name and value components are equal.public String toString()
[NAME=VALUE].public int compareTo(NameValue<T> that)
NameValue instances. Instances are ordered
by name first. If two instances have the same name, then the value is
examined. If the value implements Comparable, this is straightforward;
if not, the values are converted to strings and then compared.compareTo in interface Comparable<NameValue<T>>