Class Quartet<U,​V,​W,​X>

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

public class Quartet<U,​V,​W,​X> extends Object implements Tuple
Immutable generic 5-tuple
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    boolean
    equals​(Object o)
     
    @NonNull U
    Get the first value
    @NonNull X
    Get the fourth value
    @NonNull V
    Get the second value
    int
    Get the tuple size
    @NonNull W
    Get the third value
    int
     
    static <U,​ V,​ W,​ X> @NonNull Quartet<@NonNull U,​@NonNull V,​@NonNull W,​@NonNull X>
    of​(@NonNull U first, @NonNull V second, @NonNull W third, @NonNull X fourth)
    Create a new 4-tuple
    @NonNull Object @NonNull []
    Turn the tuple into a type erased array
     

    Methods inherited from class java.lang.Object

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

    • Quartet

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

    • of

      public static <U,​ V,​ W,​ X> @NonNull Quartet<@NonNull U,​@NonNull V,​@NonNull W,​@NonNull X> of(@NonNull U first, @NonNull V second, @NonNull W third, @NonNull X fourth)
      Create a new 4-tuple
      Type Parameters:
      U - First type
      V - Second type
      W - Third type
      X - Fourth type
      Parameters:
      first - First value
      second - Second value
      third - Third value
      fourth - Fourth value
      Returns:
      Created quartet
    • 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
    • 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