Package com.ryandw11.structure.utils
Class Pair<L,R>
java.lang.Object
com.ryandw11.structure.utils.Pair<L,R>
- Type Parameters:
L
- The type of the left item.R
- The type of the right item.
A utility class to represent a Pair.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Pair
Create a Pair.- Parameters:
left
- The left value.right
- The right value.
-
-
Method Details
-
getLeft
Get the left value.- Returns:
- The left value.
-
getRight
Get the right value.- Returns:
- The right value.
-
of
Quick way of creating a pair.- Type Parameters:
L
- The left type.R
- The right type.- Parameters:
left
- The left value.right
- The right value.- Returns:
- A new pair.
-