T1 - the type of the first element of the pairT2 - the type of the second element of the pairpublic class Pair<T1,T2>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
T1 |
a
The first element of the pair.
|
T2 |
b
The second element of the pair.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(@GuardSatisfied @Nullable java.lang.Object obj) |
int |
hashCode() |
static <A,B> Pair<A,B> |
of(A a,
B b)
Factory method with short name and no need to name type parameters.
|
java.lang.String |
toString() |
public T1 a
public T2 b
public static <A,B> Pair<A,B> of(A a, B b)
A - type of first argumentB - type of second argumenta - first argumentb - second argument@SideEffectFree public java.lang.String toString(@GuardSatisfied Pair<T1,T2> this)
toString in class java.lang.Object@Pure
public boolean equals(@GuardSatisfied Pair<T1,T2> this,
@GuardSatisfied @Nullable java.lang.Object obj)
equals in class java.lang.Object@Pure public int hashCode(@GuardSatisfied Pair<T1,T2> this)
hashCode in class java.lang.Object