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 Details

    • of

      static <L, IL, IR, R> MutableQuple<L,IL,IR,R> of(@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

      void setLeft(@Nullable L left)
      Sets the reference to the left element.
      Parameters:
      left - The new left element reference or null.
    • setInnerLeft

      void setInnerLeft(@Nullable IL innerLeft)
      Sets the reference to the inner left element.
      Parameters:
      innerLeft - The new inner left element reference or null.
    • setInnerRight

      void setInnerRight(@Nullable IR innerRight)
      Sets the reference to the inner right element.
      Parameters:
      innerRight - The new inner right element reference or null.
    • setRight

      void setRight(@Nullable R right)
      Sets the reference to the right element.
      Parameters:
      right - The new right element reference or null.
    • immutableCopy

      Quple<L,IL,IR,R> immutableCopy()
      Creates a new Quple<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

      default MutableQuple<L,IL,IR,R> mutableCopy()
      Description copied from interface: Quple
      Creates a new MutableQuple<Quple, Quple, Quple, Quple> containing references to the same left and right object this quple instance is referencing.
      Specified by:
      mutableCopy in interface Quple<L,IL,IR,R>
      Returns:
      A new MutableQuple<Quple, Quple, Quple, Quple> referencing the same elements as this quple instance.