Package ortus.boxlang.runtime.util
Class Pair<T,U>
java.lang.Object
ortus.boxlang.runtime.util.Pair<T,U>
- Type Parameters:
T- The type of the first elementU- The type of the second element
A simple immutable pair class for holding two related objects.
This is a utility class used throughout BoxLang for returning or storing two values together. The pair is typed, and both elements can be of any type.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Pair
Constructs a new immutable Pair with the given values.- Parameters:
first- The first valuesecond- The second value
-
-
Method Details
-
getFirst
Returns the first value in the pair.- Returns:
- The first value
-
getSecond
Returns the second value in the pair.- Returns:
- The second value
-
toString
Returns a string representation of the pair in the form (first, second).
-