Interface Pair<F,S>
- Type Parameters:
F- type of the first valueS- type of the second value
- All Known Subinterfaces:
MutablePair<F,S>
- All Known Implementing Classes:
MutablePair.SimpleMutablePair,Pair.SimplePair
public interface Pair<F,S>
A container holding two values.
-
Nested Class Summary
Nested Classes -
Method Summary
-
Method Details
-
getFirst
F getFirst()Gets the first value.- Returns:
- the first value
-
getSecond
S getSecond()Gets the second value.- Returns:
- the second value
-
of
Creates a new pair of the given values.- Type Parameters:
F- type of the first value of the pairS- type of the second value of the pair- Parameters:
first- first value of the pairsecond- second value of the pair- Returns:
- created pair of the given values
-