Class Tuples
- Since:
- 1.7
-
Method Summary
Modifier and TypeMethodDescriptionstatic Tuple
flatTupleOf
(Object... elements) Creates a flat tuple consisting of the given elements.static Tuple
leftInheritanceTupleOf
(Tuple ancestor, Object... localElements) Creates a left inheritance tuple that extends an ancestor tuple by the given "local" elements.static Tuple
Creates a flat tuple consisting of no elements.static Tuple
staticArityFlatTupleOf
(Object element) Creates a flat tuple consisting of the given single element.static Tuple
staticArityFlatTupleOf
(Object element0, Object element1) Creates a flat tuple consisting of the given elements.static Tuple
staticArityFlatTupleOf
(Object element0, Object element1, Object element2) Creates a flat tuple consisting of the given elements.static Tuple
staticArityFlatTupleOf
(Object element0, Object element1, Object element2, Object element3) Creates a flat tuple consisting of the given elements.static Tuple
staticArityLeftInheritanceTupleOf
(Tuple ancestor, Object element) Creates a left inheritance tuple consisting of the given single local element.static Tuple
staticArityLeftInheritanceTupleOf
(Tuple ancestor, Object element0, Object element1) Creates a left inheritance tuple consisting of the given local elements.static Tuple
staticArityLeftInheritanceTupleOf
(Tuple ancestor, Object element0, Object element1, Object element2) Creates a left inheritance tuple consisting of the given local elements.static Tuple
staticArityLeftInheritanceTupleOf
(Tuple ancestor, Object element0, Object element1, Object element2, Object element3) Creates a left inheritance tuple consisting of the given local elements.static Tuple
wideFlatTupleOf
(Object... elements) Creates a flat tuple consisting of the given elements.static Tuple
wideLeftInheritanceTupleOf
(Tuple ancestor, Object... elements) Creates a left inheritance tuple consisting of the given local elements.
-
Method Details
-
flatTupleOf
Creates a flat tuple consisting of the given elements. For low-arity tuples, specialized implementations (such asFlatTuple2
) will be instantiated.In case the exact arity is statically known, it may be more efficient for the client to instantiate the appropriate specialized implementation (via
staticArityFlatTupleOf(Object, Object)
etc. orwideFlatTupleOf(Object...)
), instead of invoking this method. This method does a runtime arity check, and therefore also appropriate if the arity is determined at runtime. -
leftInheritanceTupleOf
Creates a left inheritance tuple that extends an ancestor tuple by the given "local" elements. For locally low-arity tuples, specialized implementations (such asLeftInheritanceTuple2
) will be instantiated.In case the exact arity is statically known, it may be more efficient for the client to instantiate the appropriate specialized implementation (via
invalid reference
#staticArityLeftInheritanceTupleOf(Object, Object)
invalid reference
#wideLeftInheritanceTupleOf(Object...)
-
staticArityFlatTupleOf
Creates a flat tuple consisting of no elements. -
staticArityFlatTupleOf
Creates a flat tuple consisting of the given single element. -
staticArityFlatTupleOf
Creates a flat tuple consisting of the given elements. -
staticArityFlatTupleOf
Creates a flat tuple consisting of the given elements. -
staticArityFlatTupleOf
public static Tuple staticArityFlatTupleOf(Object element0, Object element1, Object element2, Object element3) Creates a flat tuple consisting of the given elements. -
wideFlatTupleOf
Creates a flat tuple consisting of the given elements.Invoke this only if it is statically known that the tuple will be wide. Otherwise, use
flatTupleOf(Object...)
. -
staticArityLeftInheritanceTupleOf
Creates a left inheritance tuple consisting of the given single local element. -
staticArityLeftInheritanceTupleOf
public static Tuple staticArityLeftInheritanceTupleOf(Tuple ancestor, Object element0, Object element1) Creates a left inheritance tuple consisting of the given local elements. -
staticArityLeftInheritanceTupleOf
public static Tuple staticArityLeftInheritanceTupleOf(Tuple ancestor, Object element0, Object element1, Object element2) Creates a left inheritance tuple consisting of the given local elements. -
staticArityLeftInheritanceTupleOf
public static Tuple staticArityLeftInheritanceTupleOf(Tuple ancestor, Object element0, Object element1, Object element2, Object element3) Creates a left inheritance tuple consisting of the given local elements. -
wideLeftInheritanceTupleOf
Creates a left inheritance tuple consisting of the given local elements.Invoke this only if it is statically known that the tuple will be wide. Otherwise, use
leftInheritanceTupleOf(Tuple, Object...)
.
-