- Type Parameters:
S
- Type of the first thing.
T
- Type of the second thing.
public final class Pair<S,T>
extends Object
A tuple of things.
- Since:
- 1.12
- Author:
- Tobias Trelle, Oliver Gierke, Christoph Strobl
-
Method Summary
boolean
Returns the first element of the
Pair
.
Returns the second element of the
Pair
.
int
Creates a new
Pair
for the given elements.
-
Method Details
-
of
public static <S,
T> Pair<S,T> of(S first,
T second)
Creates a new
Pair
for the given elements.
- Parameters:
first
- must not be null.
second
- must not be null.
- Returns:
-
getFirst
Returns the first element of the
Pair
.
- Returns:
-
getSecond
Returns the second element of the
Pair
.
- Returns:
-
-
-
-