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 Details

    • of

      static <L, IL, IR, R> Quple<L,IL,IR,R> of(@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,IR,R> mutableCopy()
      Creates a new MutableQuple<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

      default Triple<L,IL,IR> leftTriple()
    • rightTriple

      default Triple<IL,IR,R> rightTriple()
    • leftPair

      default Pair<L,IL> leftPair()
      Retrieve the leftmost two elements (Quple and Quple) from this quple instance and creates a new Pair<Quple, Quple> from them.
      Returns:
      A new Pair<Quple, Quple> instance, referencing the same elements as this quple instance.
    • rightPair

      default Pair<IR,R> rightPair()
      Retrieve the leftmost two elements (Quple and Quple) from this quple instance and creates a new Pair<Quple, Quple> from them.
      Returns:
      A new Pair<Quple, Quple> instance, referencing the same elements as this quple instance.
    • centerPair

      default Pair<IL,IR> centerPair()
      Retrieve the leftmost two elements (Quple and Quple) from this quple instance and creates a new Pair<Quple, Quple> from them.
      Returns:
      A new Pair<Quple, Quple> instance, referencing the same elements as this quple instance.
    • outerPair

      default Pair<L,R> outerPair()
      Retrieve the leftmost two elements (Quple and Quple) from this quple instance and creates a new Pair<Quple, Quple> from them.
      Returns:
      A new Pair<Quple, Quple> instance, referencing the same elements as this quple instance.