public final class Pair<First,Second> extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
First |
first()
Returns the first element of the
Pair . |
int |
hashCode() |
static <First,Second> |
of(First first,
Second second)
Creates a new Pair.
|
Second |
second()
Returns the second element of the
Pair . |
String |
toString() |
public static <First,Second> Pair<First,Second> of(First first, Second second)
First
- the type of the first elementSecond
- the type of the second elementfirst
- the first elementsecond
- the second elementPair
of the first and second elements.