public class Pair<T1,T2> extends Object implements Map.Entry<T1,T2>
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
T1 |
getKey() |
T2 |
getValue() |
int |
hashCode() |
static <L,R> Pair<L,R> |
of(L left,
R right)
Obtains a mutable pair of two objects inferring the generic
types.
|
T2 |
setValue(T2 value) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcomparingByKey, comparingByKey, comparingByValue, comparingByValuepublic static <L,R> Pair<L,R> of(L left, R right)
This factory allows the pair to be created using inference to obtain the generic types.
L - the left element typeR - the right element typeleft - the left element, may be nullright - the right element, may be nullpublic int hashCode()
public boolean equals(Object object)
Copyright © 2018–2025. All rights reserved.