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 TypeMethodDescriptionboolean
getFirst()
Get the first valueGet the second valueint
getSize()
Get the tuple sizegetThird()
Get the third valueint
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-tuple@NonNull Object @NonNull []
toArray()
Turn the tuple into a type erased arraytoString()
-
Constructor Details
-
Triplet
-
-
Method Details
-
of
public 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-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
-