Interface Tuple

All Superinterfaces:
Iterable<Object>
All Known Implementing Classes:
Tuple2, Tuple3, Tuple4, Tuple5, Tuple6, Tuple7, Tuple8, Tuple9

public interface Tuple extends Iterable<Object>
  • Method Details

    • nth

      Object nth(int index)
      Get the item stored at the given index.
      Parameters:
      index - The index of the item to retrieve.
      Returns:
      The item, can be null
      Throws:
      IndexOutOfBoundsException - if the index is greater than the size.
    • asList

      List<Object> asList()
      Gets a List of Objects containing the items composing this Tuple
      Returns:
      A list containing the item of the tuple.
    • iterator

      default Iterator<Object> iterator()
      Gets an immutable Iterator traversing the content of this Tuple.
      Specified by:
      iterator in interface Iterable<Object>
      Returns:
      the iterator
    • size

      int size()
      Returns:
      the number of items stored in the Tuple