Class DynamicTuple

java.lang.Object
cloud.commandframework.types.tuples.DynamicTuple
All Implemented Interfaces:
Tuple

@API(status=STABLE) public final class DynamicTuple extends Object implements Tuple
Dynamic sized tuple backed by a Object[]
  • Method Details

    • of

      public static @NonNull DynamicTuple of(@NonNull Object... elements)
      Create a new dynamic tuple, containing the given elements
      Parameters:
      elements - Elements that should be contained in the tuple
      Returns:
      Created tuple, preserving the order of the given elements
    • getSize

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

      public @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