X - class of the first elementY - class of the second elementpublic class Pair<X,Y>
extends java.lang.Object
| Constructor and Description |
|---|
Pair(X q1,
Y q2)
Creates a new pair of two elements.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
X |
getFirst()
Returns the first element of the pair
|
Y |
getSecond()
Returns the second element of the pair
|
int |
hashCode() |
java.lang.String |
toString() |
static <X,Y> Pair<java.util.List<X>,java.util.List<Y>> |
unzip(java.lang.Iterable<Pair<X,Y>> iterable) |
static <X,Y> java.util.List<Pair<X,Y>> |
zip(java.util.Collection<X> col1,
java.util.Collection<Y> col2) |
public X getFirst()
public Y getSecond()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic static <X,Y> java.util.List<Pair<X,Y>> zip(java.util.Collection<X> col1, java.util.Collection<Y> col2)