Class Tuple2<E0,E1>

java.lang.Object
com.hazelcast.jet.datamodel.Tuple2<E0,E1>
Type Parameters:
E0 - the type of the field 0
E1 - the type of the field 1
All Implemented Interfaces:
Serializable, Map.Entry<E0,E1>

public final class Tuple2<E0,E1> extends Object implements Map.Entry<E0,E1>, Serializable
An immutable 2-tuple (pair) of statically typed fields. Also implements Map.Entry.
Since:
Jet 3.0
See Also:
  • Method Details

    • tuple2

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

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

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

      @Nullable public E0 getKey()
      Specified by:
      getKey in interface Map.Entry<E0,E1>
    • getValue

      @Nullable public E1 getValue()
      Specified by:
      getValue in interface Map.Entry<E0,E1>
    • setValue

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

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

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

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

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

      public String toString()
      Overrides:
      toString in class Object