Class Triplet<U,V,W>
java.lang.Object
cloud.commandframework.types.tuples.Triplet<U,V,W>
- Type Parameters:
U
- First typeV
- Second typeW
- Third type
- All Implemented Interfaces:
Tuple
Immutable generic 3-tuple
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
final U
getFirst()
Get the first valuefinal V
Get the second valuefinal int
getSize()
Get the tuple sizefinal W
getThird()
Get the third valuefinal int
hashCode()
static <U,
V, W> @NonNull Triplet<@NonNull U, @NonNull V, @NonNull W> of
(@NonNull U first, @NonNull V second, @NonNull W third) Create a new 3-tuplefinal @NonNull Object @NonNull []
toArray()
Turn the tuple into a type erased arrayfinal String
toString()
-
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
-
getFirst
Get the first value- Returns:
- First value
-
getSecond
Get the second value- Returns:
- Second value
-
getThird
Get the third value- Returns:
- Third value
-
equals
-
hashCode
public final int hashCode() -
toString
-
getSize
public final int getSize()Description copied from interface:Tuple
Get the tuple size -
toArray
Description copied from interface:Tuple
Turn the tuple into a type erased array
-