|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.xtext.xbase.lib.Pair<K,V>
K - the key-type of the pair.V - the value-type of the pair.public final class Pair<K,V>
An immutable pair of key and value. A pair is considered to be
equal to another pair if both the key and the value are equal.
| Constructor Summary | |
|---|---|
Pair(K k,
V v)
Creates a new instance with the given key and value. |
|
| Method Summary | ||
|---|---|---|
boolean |
equals(Object o)
|
|
K |
getKey()
Returns the key. |
|
V |
getValue()
Returns the value. |
|
int |
hashCode()
|
|
static
|
of(K k,
V v)
Creates a new instance with the given key and value. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Pair(K k,
V v)
k - the key. May be null.v - the value. May be null.| Method Detail |
|---|
public static <K,V> Pair<K,V> of(K k,
V v)
k - the key. May be null.v - the value. May be null.
null.public K getKey()
public V getValue()
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||