Module com.speedment.common.tuple
Interface Tuple2OfNullables<T0,T1>
-
- Type Parameters:
T0- type of element 0T1- type of element 1
- All Superinterfaces:
BasicTuple<Optional<Object>>,TupleOfNullables
public interface Tuple2OfNullables<T0,T1> extends TupleOfNullables
This interface defines a genericTupleOfNullablesof degree2 that can hold null values. A TupleOfNullable is type safe, immutable and thread safe. For pure non-null value elements seeTuple. For mutable tuples seeMutableTupleThisTupleOfNullableshas a degree of 2Generated by com.speedment.sources.pattern.tuple.TuplePattern
- Author:
- Per Minborg
- See Also:
Tuple,TupleOfNullables,MutableTuple
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default intdegree()Returns the degree of the BasicTuple.default Optional<Object>get(int index)Gets the tuple element at the given index.Optional<T0>get0()Returns the 0th element from this tuple.Optional<T1>get1()Returns the 1st element from this tuple.default T0getOrNull0()Returns the 0th element from this tuple ornullif no such element is present.default T1getOrNull1()Returns the 1st element from this tuple ornullif no such element is present.static <T0,T1>
TupleGetter0<Tuple2OfNullables<T0,T1>,Optional<T0>>getter0()Returns agetterfor the 0th element in theTuple.static <T0,T1>
TupleGetter1<Tuple2OfNullables<T0,T1>,Optional<T1>>getter1()Returns agetterfor the 1st element in theTuple.static <T0,T1>
TupleGetter0<Tuple2OfNullables<T0,T1>,T0>getterOrNull0()Returns agetterfor the 0th element in theTuple.static <T0,T1>
TupleGetter1<Tuple2OfNullables<T0,T1>,T1>getterOrNull1()Returns agetterfor the 1st element in theTuple.-
Methods inherited from interface com.speedment.common.tuple.TupleOfNullables
stream, streamOf
-
-
-
-
Method Detail
-
get0
Optional<T0> get0()
Returns the 0th element from this tuple.- Returns:
- the 0th element from this tuple.
-
get1
Optional<T1> get1()
Returns the 1st element from this tuple.- Returns:
- the 1st element from this tuple.
-
degree
default int degree()
Description copied from interface:BasicTupleReturns the degree of the BasicTuple. For example, a Tuple2 has a degree of 2 whereas a Tuple3 has a degree of 3.- Specified by:
degreein interfaceBasicTuple<T0>- Returns:
- the degree of the Tuple
-
get
default Optional<Object> get(int index)
Description copied from interface:BasicTupleGets the tuple element at the given index. For example, get(0) will return the first element and get(1) will return the second etc.- Specified by:
getin interfaceBasicTuple<T0>- Parameters:
index- of the element to get- Returns:
- the tuple element at the given index
-
getter0
static <T0,T1> TupleGetter0<Tuple2OfNullables<T0,T1>,Optional<T0>> getter0()
Returns agetterfor the 0th element in theTuple.- Type Parameters:
T0- the 0th element typeT1- the 1st element type- Returns:
- the element at the 0th position
-
getOrNull0
default T0 getOrNull0()
Returns the 0th element from this tuple ornullif no such element is present.- Returns:
- the 0th element from this tuple or
nullif no such element is present.
-
getterOrNull0
static <T0,T1> TupleGetter0<Tuple2OfNullables<T0,T1>,T0> getterOrNull0()
Returns agetterfor the 0th element in theTuple.- Type Parameters:
T0- the 0th element typeT1- the 1st element type- Returns:
- the element at the 0th position
-
getter1
static <T0,T1> TupleGetter1<Tuple2OfNullables<T0,T1>,Optional<T1>> getter1()
Returns agetterfor the 1st element in theTuple.- Type Parameters:
T0- the 0th element typeT1- the 1st element type- Returns:
- the element at the 1st position
-
getOrNull1
default T1 getOrNull1()
Returns the 1st element from this tuple ornullif no such element is present.- Returns:
- the 1st element from this tuple or
nullif no such element is present.
-
getterOrNull1
static <T0,T1> TupleGetter1<Tuple2OfNullables<T0,T1>,T1> getterOrNull1()
Returns agetterfor the 1st element in theTuple.- Type Parameters:
T0- the 0th element typeT1- the 1st element type- Returns:
- the element at the 1st position
-
-