Package jline.util
Class Triple<A,B,C>
java.lang.Object
jline.util.Triple<A,B,C>
- Type Parameters:
A- the type of the first elementB- the type of the second elementC- the type of the third element
- All Implemented Interfaces:
Serializable
A generic triple container that holds three objects of potentially different types.
This utility class provides a simple way to group three related values together.
It implements Serializable for persistence. It is the three-element
counterpart of Pair and exposes the same Kotlin-style accessors
(getFirst(), getSecond(), getThird()) so that code
previously written against kotlin.Triple works unchanged.
Common use cases:
- Returning three values from methods
- Temporary grouping of related objects
- Since:
- 1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Triple
Constructs a new triple with the specified elements.- Parameters:
first- the first element of the triplesecond- the second element of the triplethird- the third element of the triple
-
Triple
Copy constructor that creates a new triple with the same elements as another triple.- Parameters:
other- the triple to copy from
-
-
Method Details