Package com.hazelcast.jet.datamodel
Class Tuple2<E0,E1>
- java.lang.Object
-
- com.hazelcast.jet.datamodel.Tuple2<E0,E1>
-
- Type Parameters:
E0
- the type of the field 0E1
- the type of the field 1
- All Implemented Interfaces:
java.io.Serializable
,java.util.Map.Entry<E0,E1>
public final class Tuple2<E0,E1> extends java.lang.Object implements java.util.Map.Entry<E0,E1>, java.io.Serializable
An immutable 2-tuple (pair) of statically typed fields. Also implementsMap.Entry
.- Since:
- Jet 3.0
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
E0
f0()
Returns the value of the field 0.E1
f1()
Returns the value of the field 1.E0
getKey()
E1
getValue()
int
hashCode()
E0
requiredF0()
Returns the value of the f0, throwing if it's null.E1
requiredF1()
Returns the value of the f1, throwing if it's null..E1
setValue(E1 value)
java.lang.String
toString()
static <E0,E1>
Tuple2<E0,E1>tuple2(E0 f0, E1 f1)
Returns a new 2-tuple with the supplied values.
-
-
-
Method Detail
-
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.
-
getValue
@Nullable public E1 getValue()
-
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(java.lang.Object obj)
-
hashCode
public int hashCode()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-