public final class DefaultKeyedValue<T> extends java.lang.Object implements KeyedValue<T>, java.io.Serializable
| Constructor and Description |
|---|
DefaultKeyedValue(java.lang.Comparable<?> key,
T value)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.
|
java.lang.Comparable<?> |
getKey()
Returns the key.
|
T |
getValue()
Returns the value.
|
void |
setValue(T value)
Sets the value.
|
java.lang.String |
toString() |
public DefaultKeyedValue(java.lang.Comparable<?> key, T value)
key - the key (null not permitted).value - the value.public java.lang.Comparable<?> getKey()
getKey in interface KeyedValue<T>null).public T getValue()
getValue in interface KeyedValue<T>null).public void setValue(T value)
value - the value (null permitted).public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to test (null permitted).public java.lang.String toString()
toString in class java.lang.Object