Interface BaseTuple<E>

Type Parameters:
E - The type of element this tuple should hold
All Superinterfaces:
Serializable
All Known Subinterfaces:
BigVector<N,D,V,DV,PV>, DecimalVector<V,PV>, DoubleTuple, FloatTuple, IntegerVector<V,DV,PV>, IntTuple, LongTuple, Tuple<E>, Vector<V>
All Known Implementing Classes:
ArrayTuple, ArrayVector, Decimal2, Decimal3, Decimal4, DecimalQuaternion, Double1, Double2, Double3, Double4, DoubleArrayTuple, Float1, Float2, Float3, Float4, FloatArrayTuple, Int1, Int2, Int3, Int4, IntArrayTuple, Integer2, Integer3, Integer4, Long1, Long2, Long3, Long4, LongArrayTuple, Object1, Object2, Object3, Object4, Quaternion, Vector2, Vector3, Vector4

public interface BaseTuple<E> extends Serializable
The base class for all tuples, including primitive specialized tuples.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    equals(BaseTuple<?> t1, BaseTuple<?> t2)
    Checks for equality between two instances of tuples.
    static boolean
    Checks for equality between two instances of tuples without regard to their elements' order.
    Returns an unmodifiable list containing the components of this tuple in their proper order.
    int
    Returns the size of this tuple.
  • Method Details

    • equals

      static boolean equals(@Nullable BaseTuple<?> t1, @Nullable BaseTuple<?> t2)
      Checks for equality between two instances of tuples. This will return true if the size, order of elements, and the elements' values are all equal. In other words, this returns true if the list representations are equal. (or both tuples are null, in which case null == null)
      Parameters:
      t1 - The first tuple to compare
      t2 - The second tuple to compare
      Returns:
      true if the tuples are considered equal according to the criteria mentioned above
    • equalsIgnoreOrder

      static boolean equalsIgnoreOrder(@Nullable BaseTuple<?> t1, @Nullable BaseTuple<?> t2)
      Checks for equality between two instances of tuples without regard to their elements' order. This will return true if the sizes are equal, and the first tuple contains every element of the second tuple. (or both tuples are null, in which case null == null)
      Parameters:
      t1 - The first tuple to compare
      t2 - The second tuple to compare
      Returns:
      true if the tuples are considered equal according to the criteria mentioned above
    • size

      int size()
      Returns the size of this tuple. (the number of components it has)
      Returns:
      The number of components this tuple has
    • list

      @Nonnull List<E> list()
      Returns an unmodifiable list containing the components of this tuple in their proper order.
      Returns:
      The list representation of this tuple