T - the first typeU - the second typepublic final class Pair<T,U>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
T |
first
The first object.
|
U |
second
The second object.
|
| Constructor and Description |
|---|
Pair(T first,
U second)
Construct a pair.
|
public final T first
public final U second
public static <T,U> Pair<T,U> of(T first, U second)
T - the first typeU - the second typefirst - the first objectsecond - the second objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object