Class DynamicTuple

java.lang.Object
org.incendo.cloud.type.tuple.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
    • size

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

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