Package io.karma.kommons.tuple
Interface Quple<L,IL,IR,R>
- Type Parameters:
L
- The left element type.R
- The right element type.
- All Known Subinterfaces:
MutableQuple<L,
IL, IR, R>
@API(status=STABLE)
public interface Quple<L,IL,IR,R>
A simple immutable quadruple tuple type which can hold four objects.
- Since:
- 11/08/2022
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the inner left element of this quple instance.Retrieves the inner right element of this quple instance.getLeft()
Retrieves the left element of this quple instance.getRight()
Retrieves the right element of this quple instance.leftPair()
MutableQuple
<L, IL, IR, R> Creates a newMutableQuple
<Quple
,Quple
,Quple
,Quple
> containing references to the same left and right object this quple instance is referencing.static <L,
IL, IR, R>
Quple<L, IL, IR, R> of
(L left, IL innerLeft, IR innerRight, R right) Creates a new immutable quple of the given elements.
-
Method Details
-
of
static <L,IL, Quple<L,IR, R> IL, ofIR, R> (@Nullable L left, @Nullable IL innerLeft, @Nullable IR innerRight, @Nullable R right) Creates a new immutable quple of the given elements.- Type Parameters:
L
- The left element type.IL
- The inner left element type.IR
- The inner right element type.R
- The right element type.- Parameters:
left
- The left element or null.right
- The right element or null.- Returns:
- A new
Quple
<Quple
,Quple
,Quple
,Quple
> containing references to the given element(s).
-
getLeft
L getLeft()Retrieves the left element of this quple instance.- Returns:
- The left element referenced by this quple instance.
-
getInnerLeft
IL getInnerLeft()Retrieves the inner left element of this quple instance.- Returns:
- The inner left element referenced by this quple instance.
-
getInnerRight
IR getInnerRight()Retrieves the inner right element of this quple instance.- Returns:
- The inner right element referenced by this quple instance.
-
getRight
R getRight()Retrieves the right element of this quple instance.- Returns:
- The right element referenced by this quple instance.
-
mutableCopy
MutableQuple<L,IL, mutableCopy()IR, R> Creates a newMutableQuple
<Quple
,Quple
,Quple
,Quple
> containing references to the same left and right object this quple instance is referencing.- Returns:
- A new
MutableQuple
<Quple
,Quple
,Quple
,Quple
> referencing the same elements as this quple instance.
-
leftTriple
-
rightTriple
-
leftPair
-
rightPair
-
centerPair
-
outerPair
-