Uses of Interface
dk.cloudcreate.essentials.shared.functional.tuple.Tuple
-
Packages that use Tuple Package Description dk.cloudcreate.essentials.shared.functional.tuple -
-
Uses of Tuple in dk.cloudcreate.essentials.shared.functional.tuple
Classes in dk.cloudcreate.essentials.shared.functional.tuple with type parameters of type Tuple Modifier and Type Interface Description interfaceTuple<CONCRETE_TUPLE extends Tuple<CONCRETE_TUPLE>>Base interface for allTuple's.
ATupleis an immutable object that can contain the following (supported) number of elements: Number of element in TupleConcreteTupletypeFactory method 0Emptyempty()1Singleof(Object)2Pairof(Object, Object)3Tripleof(Object, Object, Object)
Note:Tuple(and its subclasses) supportsObject.equals(Object)comparison using subclasses for the different subclassesClasses in dk.cloudcreate.essentials.shared.functional.tuple that implement Tuple Modifier and Type Class Description classEither<T1,T2>Represents aTuplewith two potential elements, but where only one element can have a value at a time
This is used to represent a choice type that can have two different values, but only one value at a time.
The value can either beEither._1()OREither._2()
UseEither(Object, Object)orEither.of_1(Object)/Either.of_2(Object)to create a newEitherinstance
UseEither.is_1()orEither.is_2()to check which value is non-null andEither._1()orEither._2()to get the value of the element.
Conditional logic can be applied usingEither.ifIs_1(Consumer)orEither.ifIs_2(Consumer)classEmptyRepresents aTuplewith zero elementsclassPair<T1,T2>Represents aTuplewith two elements.
Note:PairsupportsPair.equals(Object)comparison using subclasses, e.g.:classSingle<T1>Represents aTuplewith one element.
Note:SinglesupportsSingle.equals(Object)comparison using subclasses, e.g.:classTriple<T1,T2,T3>Represents aTuplewith three elements.
Note:TriplesupportsTriple.equals(Object)comparison using subclasses, e.g.:
-