T
- public class Pair<T,U>
extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
T |
getFirst() |
U |
getSecond() |
int |
hashCode() |
void |
setFirst(T first) |
void |
setSecond(U second) |
String |
toString() |
static <V,W> Pair<V,W>[] |
zip(V[] t,
W[] u)
Combines two arrays of equal length into an array of Pair
objects for convenience in loop or parameter passing.
|
public T getFirst()
public void setFirst(T first)
public U getSecond()
public void setSecond(U second)
public String toString()
toString
in class Object
public static <V,W> Pair<V,W>[] zip(V[] t, W[] u)
t
- First array, stored in the first locationu
- Second array, stored in the second locationpublic int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object