Package com.yetnt.utils.tuple
Class Pair<T,U>
java.lang.Object
com.yetnt.utils.tuple.Pair<T,U>
- Type Parameters:
T- The type of the first object.U- The type of the second object.
- Direct Known Subclasses:
SamePair
A generic Pair class that holds two related objects.
From Jaiva!
- Author:
- Lehlogonolo Poole
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPair(MutablePair<T, U> pair) Creates an immutablePairfrom aMutablePairinstance by fetching it's values.Constructs a Pair with the specified objects. -
Method Summary
-
Field Details
-
first
The first object in the pair. -
second
The second object in the pair.
-
-
Constructor Details
-
Pair
Constructs a Pair with the specified objects.- Parameters:
first- The first object.second- The second object.
-
Pair
Creates an immutablePairfrom aMutablePairinstance by fetching it's values.- Parameters:
pair- The mutable pair
-
-
Method Details