Package org.polyfrost.polyui.utils
Class MutablePair
-
- All Implemented Interfaces:
public final class MutablePair<A extends Object, B extends Object>Represents a generic pair of two values.
There is no meaning attached to values in this class, it can be used for any purpose. Pair exhibits value semantics, i.e. two pairs are equal if both components are equal.
An example of decomposing it into values:
-
-
Constructor Summary
Constructors Constructor Description MutablePair(A first, B second)Creates a new instance of Pair.
-
Method Summary
Modifier and Type Method Description final AgetFirst()First value. final UnitsetFirst(A first)First value. final BgetSecond()Second value. final UnitsetSecond(B second)Second value. StringtoString()Returns string representation of the MutablePair including its first and second values. final ArrayList<Object>toList()Converts this pair into a list. final Pair<A, B>toPair()Converts this mutable pair into an immutable Pair. -
-
Method Detail
-
toString
String toString()
Returns string representation of the MutablePair including its first and second values.
-
-
-
-