Package io.karma.kommons.tuple
Interface MutableQuple<L,IL,IR,R>
- Type Parameters:
L
- The left element type.IL
- The inner left element type.IR
- The inner right element type.R
- The right element type.
- All Superinterfaces:
Copyable<MutableQuple<L,
,IL, IR, R>> Quple<L,
IL, IR, R>
@API(status=STABLE)
public interface MutableQuple<L,IL,IR,R>
extends Quple<L,IL,IR,R>, Copyable<MutableQuple<L,IL,IR,R>>
A mutable specialization of
Quple
,
which allows setting the elements referenced by this quple instance.- Since:
- 11/08/2022
-
Method Summary
Modifier and TypeMethodDescriptionCreates a newQuple
<MutableQuple
,MutableQuple
,MutableQuple
,MutableQuple
> containing references to the same objects this quple instance is referencing.default 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>
MutableQuple<L, IL, IR, R> of
(L left, IL innerLeft, IR innerRight, R right) Creates a new mutable quple of the given elements.void
setInnerLeft
(IL innerLeft) Sets the reference to the inner left element.void
setInnerRight
(IR innerRight) Sets the reference to the inner right element.void
Sets the reference to the left element.void
Sets the reference to the right element.Methods inherited from interface io.karma.kommons.tuple.Quple
centerPair, getInnerLeft, getInnerRight, getLeft, getRight, leftPair, leftTriple, outerPair, rightPair, rightTriple
-
Method Details
-
of
static <L,IL, MutableQuple<L,IR, R> IL, ofIR, R> (@Nullable L left, @Nullable IL innerLeft, @Nullable IR innerRight, @Nullable R right) Creates a new mutable 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
MutableQuple
<MutableQuple
,MutableQuple
,MutableQuple
,MutableQuple
> containing references to the given element(s).
-
setLeft
Sets the reference to the left element.- Parameters:
left
- The new left element reference or null.
-
setInnerLeft
Sets the reference to the inner left element.- Parameters:
innerLeft
- The new inner left element reference or null.
-
setInnerRight
Sets the reference to the inner right element.- Parameters:
innerRight
- The new inner right element reference or null.
-
setRight
Sets the reference to the right element.- Parameters:
right
- The new right element reference or null.
-
immutableCopy
Creates a newQuple
<MutableQuple
,MutableQuple
,MutableQuple
,MutableQuple
> containing references to the same objects this quple instance is referencing.- Returns:
- A new
Quple
<MutableQuple
,MutableQuple
,MutableQuple
,MutableQuple
> referencing the same elements as this quple instance.
-
mutableCopy
Description copied from interface:Quple
Creates a newMutableQuple
<Quple
,Quple
,Quple
,Quple
> containing references to the same left and right object this quple instance is referencing.
-