|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.KeyValue<K,V>
public class KeyValue<K,V>
Methods that want to return a single key-value pair, like a map.entry.
| Field Summary | |
|---|---|
private K |
key
The key. |
private V |
value
The value. |
| Constructor Summary | |
|---|---|
KeyValue(K k,
V v)
Constructs a new key-value pair. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
Equals method like in map.entry. |
K |
getKey()
Returns the key. |
V |
getValue()
Retruns the associated value. |
int |
hashCode()
Hash code like for map entry. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private K key
private V value
| Constructor Detail |
|---|
public KeyValue(K k,
V v)
| Method Detail |
|---|
public K getKey()
public V getValue()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||