K
- Key type.V
- Value type.public class Pair<K,V> extends Object
Constructor and Description |
---|
Pair(K k,
V v)
Create an entry representing a mapping from the specified key to the
specified value.
|
Pair(Pair<? extends K,? extends V> entry)
Create an entry representing the same mapping as the specified entry.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Compare the specified object with this entry for equality.
|
K |
getFirst()
Get the first element of the pair.
|
K |
getKey()
Get the key.
|
V |
getSecond()
Get the second element of the pair.
|
V |
getValue()
Get the value.
|
int |
hashCode()
Compute a hash code.
|
public Pair(K k, V v)
k
- Key (first element of the pair).v
- Value (second element of the pair).public K getKey()
public V getValue()
public K getFirst()
public V getSecond()
public boolean equals(Object o)
Copyright © 2018 CNES. All Rights Reserved.