Class Tuple2<E0,​E1>

  • Type Parameters:
    E0 - the type of the field 0
    E1 - the type of the field 1
    All Implemented Interfaces:, java.util.Map.Entry<E0,​E1>

    public final class Tuple2<E0,​E1>
    extends java.lang.Object
    implements java.util.Map.Entry<E0,​E1>,
    An immutable 2-tuple (pair) of statically typed fields. Also implements Map.Entry.
    Jet 3.0
    See Also:
    Serialized Form
    • Method Detail

      • tuple2

        public static <E0,​E1> Tuple2<E0,​E1> tuple2​(@Nullable
                                                               E0 f0,
                                                               E1 f1)
        Returns a new 2-tuple with the supplied values.
      • f0

        public E0 f0()
        Returns the value of the field 0.
      • f1

        public E1 f1()
        Returns the value of the field 1.
      • getKey

        public E0 getKey()
        Specified by:
        getKey in interface java.util.Map.Entry<E0,​E1>
      • getValue

        public E1 getValue()
        Specified by:
        getValue in interface java.util.Map.Entry<E0,​E1>
      • setValue

        public E1 setValue​(@Nullable
                           E1 value)
        Specified by:
        setValue in interface java.util.Map.Entry<E0,​E1>
      • requiredF0

        public E0 requiredF0()
        Returns the value of the f0, throwing if it's null.
      • requiredF1

        public E1 requiredF1()
        Returns the value of the f1, throwing if it's null..
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface java.util.Map.Entry<E0,​E1>
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map.Entry<E0,​E1>
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object