| Constructor and Description |
|---|
Pair(A fst,
B snd)
Construct a tuple.
|
Pair(Pair<? extends A,? extends B> pair) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
A |
getFst() |
B |
getSnd() |
int |
hashCode() |
static <A,B> List<A> |
mapFst(List<Pair<A,B>> pairs)
Returns the first element of the tuples in the same order.
|
static <A,B> A[] |
mapFst(Pair<A,B>[] pairs,
A... array)
Returns the first element of the tuples in the same order.
|
static <A,B> List<B> |
mapSnd(List<Pair<A,B>> pairs)
Returns the second element of the tuples in the same order.
|
static <A,B> B[] |
mapSnd(Pair<A,B>[] pairs,
B... array)
Returns the second element of the tuples in the same order.
|
String |
toString() |
public static <A,B> List<A> mapFst(List<Pair<A,B>> pairs)
map fst.A - the type of first element in the pairsB - the type of second element in the pairspairs - the tuples@SafeVarargs public static <A,B> A[] mapFst(Pair<A,B>[] pairs, A... array)
map fst.A - the type of first element in the pairsB - the type of second element in the pairspairs - the tuplesarray - the array to write to if the size is correctpublic static <A,B> List<B> mapSnd(List<Pair<A,B>> pairs)
map snd.A - the type of first element in the pairsB - the type of second element in the pairspairs - the tuples@SafeVarargs public static <A,B> B[] mapSnd(Pair<A,B>[] pairs, B... array)
map snd.A - the type of first element in the pairsB - the type of second element in the pairspairs - the tuplesarray - the array to write to if the size is correctCopyright © 2013. All Rights Reserved.