A - The type of the 1st item in the pair.B - The type of the 2nd item in the pair.public class Pair<A,B> extends Object
| Constructor and Description |
|---|
Pair(A first,
B second)
Creates a new pair.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static <S,T> com.google.common.base.Function<Pair<S,T>,S> |
first()
Creates a function that can extract the first item of pairs of the given type parametrization.
|
A |
getFirst() |
B |
getSecond() |
int |
hashCode() |
static <A,B> Pair<A,B> |
of(A a,
B b)
Convenience method to create a pair.
|
static <S,T> com.google.common.base.Function<Pair<S,T>,T> |
second()
Creates a function that can extract the second item of pairs of the given type parametrization.
|
String |
toString() |
public static <S,T> com.google.common.base.Function<Pair<S,T>,S> first()
S - The type of the 1st item in the pair.T - The type of the 2nd item in the pair.public static <S,T> com.google.common.base.Function<Pair<S,T>,T> second()
S - The type of the 1st item in the pair.T - The type of the 2nd item in the pair.