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