Class LongLongTuple2

    • Method Detail

      • of

        public static LongLongTuple2 of​(long t1,
                                        long t2)
        Create a LongLongTuple2 with the given objects.
        Parameters:
        t1 - The first value in the tuple. Not null.
        t2 - The second value in the tuple. Not null.
        Returns:
        The new LongLongTuple2.
      • getT1

        public long getT1()
        Type-safe way to get the fist object of this Tuples.
        Returns:
        The first object
      • getT2

        public long getT2()
        Type-safe way to get the second object of this Tuples.
        Returns:
        The second object
      • get

        public long get​(int index)
        Get the object at the given index.
        Parameters:
        index - The index of the object to retrieve. Starts at 0.
        Returns:
        The object or throws IndexOutOfBoundsException if out of bounds.
        Throws:
        IndexOutOfBoundsException - if the index is out of range.
      • toList

        public List<Long> toList()
        Turn this Tuples into a plain Object list.
        Returns:
        A new Object list.
      • toArray

        public long[] toArray()
        Turn this Tuples into a plain Object array.
        Returns:
        A new Object array.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • size

        public int size()
        Return the number of elements in this Tuples.
        Returns:
        The size of this Tuples.
      • toString

        public final String toString()
        A Tuple String representation is the comma separated list of values, enclosed in square brackets.
        Overrides:
        toString in class Object
        Returns:
        the Tuple String representation