Class LongObjTuple2<T>

    • Method Detail

      • of

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

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

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

        @Nullable
        public Object 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 null if out of bounds.
      • toList

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

        public Object[] 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