Class Tuple1<V1>

    • Field Detail

      • v1

        public final V1 v1
        The V 1.
    • Constructor Detail

      • Tuple1

        protected Tuple1​(Object[] array)
      • Tuple1

        public Tuple1​(Tuple1<? extends V1> other)
        Instantiates a new Tuple 1.
        Parameters:
        other - the other
    • Method Detail

      • of

        public static <V1> Tuple1<V1> of​(V1 v1)
        Of tuple 1.
        Type Parameters:
        V1 - the type parameter
        Parameters:
        v1 - the v 1
        Returns:
        the tuple 1
      • appendLeft

        public <T> Tuple2<T,​V1> appendLeft​(T object)
        Description copied from class: Tuple
        Appends an item the beginning of the tuple resulting in a new tuple of degree + 1
        Overrides:
        appendLeft in class Tuple
        Type Parameters:
        T - the type parameter
        Parameters:
        object - the object being appended
        Returns:
        A new tuple of degree + 1 containing the object at the beginning
      • appendRight

        public <T> Tuple2<V1,​T> appendRight​(T object)
        Description copied from class: Tuple
        Appends an item the end of the tuple resulting in a new tuple of degree + 1
        Overrides:
        appendRight in class Tuple
        Type Parameters:
        T - the type parameter
        Parameters:
        object - the object being appended
        Returns:
        A new tuple of degree + 1 containing the object at the end
      • array

        public Object[] array()
        Description copied from class: Tuple
        The tuple as an array of objects
        Specified by:
        array in class Tuple
        Returns:
        an array representing the items in the tuple
      • copy

        public Tuple1<V1> copy()
        Description copied from interface: Copyable

        Makes a copy of this object.

        Returns:
        A copy of this object.
      • degree

        public int degree()
        Description copied from class: Tuple
        The number of items in the tuple
        Specified by:
        degree in class Tuple
        Returns:
        the number of items in the tuple
      • get

        public <T> T get​(int i)
        Description copied from class: Tuple
        Gets the ith item of the tuple.
        Overrides:
        get in class Tuple
        Type Parameters:
        T - the type parameter
        Parameters:
        i - the index of the item
        Returns:
        the item at the ith index
      • getV1

        public V1 getV1()