Package org.incendo.cloud.type.tuple
Class Triplet<U,V,W>
java.lang.Object
org.incendo.cloud.type.tuple.Triplet<U,V,W>
- Type Parameters:
U- First typeV- Second typeW- Third type
- All Implemented Interfaces:
Tuple
Immutable generic 3-tuple
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanfinal Ufirst()Get the first valuefinal inthashCode()Create a new 3-tuplefinal Vsecond()Get the second valuefinal intsize()Returns the tuple size.final Wthird()Get the third valuetoArray()Turns the tuple into a type erased array.final StringtoString()
-
Constructor Details
-
Triplet
-
-
Method Details
-
of
public static <U,V, @NonNull Triplet<@NonNull U,W> @NonNull V, of@NonNull W> (@NonNull U first, @NonNull V second, @NonNull W third) Create a new 3-tuple- Type Parameters:
U- First typeV- Second typeW- Third type- Parameters:
first- First valuesecond- Second valuethird- Third value- Returns:
- Created triplet
-
first
Get the first value- Returns:
- First value
-
second
Get the second value- Returns:
- Second value
-
third
Get the third value- Returns:
- Third value
-
equals
-
hashCode
public final int hashCode() -
toString
-
size
public final int size()Description copied from interface:TupleReturns the tuple size. -
toArray
Description copied from interface:TupleTurns the tuple into a type erased array.
-