public final class DefaultKeyedValue<K extends java.lang.Comparable<K>,T> extends java.lang.Object implements KeyedValue<K,T>, java.io.Serializable
| Constructor and Description |
|---|
DefaultKeyedValue(K 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.
|
K |
getKey()
Returns the key.
|
T |
getValue()
Returns the value.
|
void |
setValue(T value)
Sets the value.
|
java.lang.String |
toString() |
public DefaultKeyedValue(K key, T value)
key - the key (null not permitted).value - the value.public K getKey()
getKey in interface KeyedValue<K extends java.lang.Comparable<K>,T>null).public T getValue()
getValue in interface KeyedValue<K extends java.lang.Comparable<K>,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