Class Quintet<U,V,W,X,Y>

java.lang.Object
cloud.commandframework.types.tuples.Quintet<U,V,W,X,Y>
Type Parameters:
U - First type
V - Second type
W - Third type
X - Fourth type
Y - Fifth type
All Implemented Interfaces:
Tuple

@API(status=STABLE) public class Quintet<U,V,W,X,Y> extends Object implements Tuple
Immutable generic 5-tuple
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Quintet(@NonNull U first, @NonNull V second, @NonNull W third, @NonNull X fourth, @NonNull Y fifth)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
     
    final @NonNull Y
    Get the fifth value
    final @NonNull U
    Get the first value
    final @NonNull X
    Get the fourth value
    final @NonNull V
    Get the second value
    final int
    Get the tuple size
    final @NonNull W
    Get the third value
    final int
     
    static <U, V, W, X, Y>
    @NonNull Quintet<@NonNull U,@NonNull V,@NonNull W,@NonNull X,@NonNull Y>
    of(@NonNull U first, @NonNull V second, @NonNull W third, @NonNull X fourth, @NonNull Y fifth)
    Create a new 5-tuple
    final @NonNull Object @NonNull []
    Turn the tuple into a type erased array
    final String
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Quintet

      protected Quintet(@NonNull U first, @NonNull V second, @NonNull W third, @NonNull X fourth, @NonNull Y fifth)
  • Method Details

    • of

      public static <U, V, W, X, Y> @NonNull Quintet<@NonNull U,@NonNull V,@NonNull W,@NonNull X,@NonNull Y> of(@NonNull U first, @NonNull V second, @NonNull W third, @NonNull X fourth, @NonNull Y fifth)
      Create a new 5-tuple
      Type Parameters:
      U - First type
      V - Second type
      W - Third type
      X - Fourth type
      Y - Fifth type
      Parameters:
      first - First value
      second - Second value
      third - Third value
      fourth - Fourth value
      fifth - fifth value
      Returns:
      Created quintet
    • getFirst

      public final @NonNull U getFirst()
      Get the first value
      Returns:
      First value
    • getSecond

      public final @NonNull V getSecond()
      Get the second value
      Returns:
      Second value
    • getThird

      public final @NonNull W getThird()
      Get the third value
      Returns:
      Third value
    • getFourth

      public final @NonNull X getFourth()
      Get the fourth value
      Returns:
      Fourth value
    • getFifth

      public final @NonNull Y getFifth()
      Get the fifth value
      Returns:
      Fifth value
    • equals

      public final boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • getSize

      public final int getSize()
      Description copied from interface: Tuple
      Get the tuple size
      Specified by:
      getSize in interface Tuple
      Returns:
      Tuple size
    • toArray

      public final @NonNull Object @NonNull [] toArray()
      Description copied from interface: Tuple
      Turn the tuple into a type erased array
      Specified by:
      toArray in interface Tuple
      Returns:
      Created array