Interface Tuple

All Known Implementing Classes:
Tuple1, Tuple2, Tuple3, Tuple4, Tuple5

public interface Tuple
Implemented by all "tuple" classes.
  • Method Summary

    Modifier and Type
    Method
    Description
    View this instance as a list.
    boolean
    Compare for equality.
    int
    Get the number of values in this tuple.
    int
    Compute hash code.
  • Method Details

    • getSize

      int getSize()
      Get the number of values in this tuple.
      Returns:
      the size of this tuple
    • asList

      List<Object> asList()
      View this instance as a list.
      Returns:
      unmodifiable List view of this tuple
    • equals

      boolean equals(Object obj)
      Compare for equality.

      Tuples are equal if they have the same size and the corresponding individual values are equal (or null).

      Overrides:
      equals in class Object
    • hashCode

      int hashCode()
      Compute hash code.

      The hash code of a tuple is the exclusive-OR of the hash codes of the individual values (using zero for null values).

      Overrides:
      hashCode in class Object