| Modifier and Type | Field and Description |
|---|---|
| private final K | key
Key. |
| private final V | value
Value. |
| Access | Constructor and Description |
|---|---|
| public | Pair(K
Key (first element of the pair). k, V Value (second element of the pair). v)Create an entry representing a mapping from the specified key to the specified value. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static < the key type K, the value type V> Pair | Returns: a newPair containing k and v.First element of the pair. k, V Second element of the pair. v)Convenience factory method that calls the
|
| public boolean | Returns: true if the given object is also a map entry and
the two entries represent the same mapping.Object. o)Overrides java. Compare the specified object with this entry for equality. |
| public K | |
| public K | |
| public V | |
| public V | |
| public int | |
| public String |
| key | back to summary |
|---|---|
| private final K key Key. | |
| value | back to summary |
|---|---|
| private final V value Value. | |
| Pair | back to summary |
|---|---|
| public Pair(K k, V v) Create an entry representing a mapping from the specified key to the specified value.
| |
| Pair | back to summary |
|---|---|
| public Pair(Pair<? extends K, ? extends V> entry) Create an entry representing the same mapping as the specified entry.
| |
| create | back to summary |
|---|---|
| public static <K, V> Pair Convenience factory method that calls the
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Compare the specified object with this entry for equality. | |
| getFirst | back to summary |
|---|---|
| public K getFirst() Get the first element of the pair.
| |
| getKey | back to summary |
|---|---|
| public K getKey() Get the key.
| |
| getSecond | back to summary |
|---|---|
| public V getSecond() Get the second element of the pair.
| |
| getValue | back to summary |
|---|---|
| public V getValue() Get the value.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Compute a hash code.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |