public class Pair<T1,T2> extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static <S,T> Set<S> |
getFirstSet(Collection<Pair<S,T>> pairs)
Returns the set of first entries from a collection of pairs.
|
static <S,T> Set<T> |
getSecondSet(Collection<Pair<S,T>> pairs)
Returns the set of second entries from a collection of pairs.
|
int |
hashCode() |
static <S,T> Map<S,T> |
toMap(Collection<Pair<S,T>> pairs)
Convert a collection of pairs into a map.
|
String |
toString() |
public static <S,T> Map<S,T> toMap(Collection<Pair<S,T>> pairs)
IllegalArgumentException
- if it contains duplicate first entriespublic static <S,T> Set<S> getFirstSet(Collection<Pair<S,T>> pairs)
public static <S,T> Set<T> getSecondSet(Collection<Pair<S,T>> pairs)