Klasse MultiRightPairList<LeftT,RightT>

java.lang.Object
java.util.AbstractCollection<MultiRightPair<LeftT,RightT>>
java.util.AbstractList<MultiRightPair<LeftT,RightT>>
java.util.AbstractSequentialList<MultiRightPair<LeftT,RightT>>
java.util.LinkedList<MultiRightPair<LeftT,RightT>>
de.kamillionlabs.hateoflux.utility.pair.MultiRightPairList<LeftT,RightT>
Typparameter:
LeftT - the type of the left elements in the pairs
RightT - the type of the right elements in the pairs
Alle implementierten Schnittstellen:
Serializable, Cloneable, Iterable<MultiRightPair<LeftT,RightT>>, Collection<MultiRightPair<LeftT,RightT>>, Deque<MultiRightPair<LeftT,RightT>>, List<MultiRightPair<LeftT,RightT>>, Queue<MultiRightPair<LeftT,RightT>>, SequencedCollection<MultiRightPair<LeftT,RightT>>

public class MultiRightPairList<LeftT,RightT> extends LinkedList<MultiRightPair<LeftT,RightT>>
Utility class that associates multiple RightT values with a single LeftT value. It serves as a shorthand for List<MultiRightPair<LeftT, RightT>>.

A key difference from MultiValueMap is that this class maintains a list of pairs rather than a map. This distinction emphasizes the semantic difference between "pairs" and "key/value" relationships that this class aims to convey.

Unlike a map, MultiRightPairList also allows duplicate LeftT entries, enabling multiple associations of the same LeftT with different lists of RightT values.

Siehe auch:
  • Methodendetails

    • toMultiRightPairFlux

      public MultiRightPairFlux<LeftT,RightT> toMultiRightPairFlux()
      Converts this MultiRightPairList instance to a MultiRightPairFlux instance, allowing the pairs in this list to be used in a reactive stream.

      This method creates a new MultiRightPairFlux that emits each pair contained in this MultiRightPairList.

      Gibt zurück:
      a MultiRightPairFlux instance containing the same pairs as this MultiRightPairList
    • add

      public boolean add(LeftT left, List<RightT> rights)
      Adds a new pair to the list.
      Parameter:
      left - the left element of the pair
      rights - the right elements of the pair
      Gibt zurück:
      true (as specified by Collection.add(E))
    • getLeft

      public LeftT getLeft(int i)
      Retrieves the left element of the pair at the specified index.
      Parameter:
      i - the index of the pair
      Gibt zurück:
      the left element of the pair at the specified index
    • getRights

      public List<RightT> getRights(int i)
      Retrieves the right elements of the pair at the specified index.
      Parameter:
      i - the index of the pair
      Gibt zurück:
      the right elements of the pair at the specified index
    • getLefts

      public List<LeftT> getLefts()
      Returns a list of all left elements in the pairs.
      Gibt zurück:
      a list containing all left elements
    • getFlattenedRights

      public List<RightT> getFlattenedRights()
      Returns a flattened list of all right elements in the pairs.
      Gibt zurück:
      a list containing all right elements
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of()
      Creates an empty MultiRightPairList.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Gibt zurück:
      a new empty MultiRightPairList
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(List<MultiRightPair<LeftT,RightT>> pairs)
      Creates a MultiRightPairList from a list of MultiRightPairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      pairs - the list of pairs
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(org.springframework.util.MultiValueMap<LeftT,RightT> map)
      Creates a MultiRightPairList from a MultiValueMap.
      Typparameter:
      LeftT - the type of the left elements in the map
      RightT - the type of the right elements in the map
      Parameter:
      map - the map containing left and right elements
      Gibt zurück:
      a new MultiRightPairList containing values from the map
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, List<RightT> r1)
      Creates a MultiRightPairList with a single pair.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right elements of the first pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pair
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, List<RightT> r1, LeftT l2, List<RightT> r2)
      Creates a MultiRightPairList with two pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right elements of the first pair
      l2 - the left element of the second pair
      r2 - the right elements of the second pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, List<RightT> r1, LeftT l2, List<RightT> r2, LeftT l3, List<RightT> r3)
      Creates a MultiRightPairList with three pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right elements of the first pair
      l2 - the left element of the second pair
      r2 - the right elements of the second pair
      l3 - the left element of the third pair
      r3 - the right elements of the third pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, List<RightT> r1, LeftT l2, List<RightT> r2, LeftT l3, List<RightT> r3, LeftT l4, List<RightT> r4)
      Creates a MultiRightPairList with four pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right elements of the first pair
      l2 - the left element of the second pair
      r2 - the right elements of the second pair
      l3 - the left element of the third pair
      r3 - the right elements of the third pair
      l4 - the left element of the fourth pair
      r4 - the right elements of the fourth pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, List<RightT> r1, LeftT l2, List<RightT> r2, LeftT l3, List<RightT> r3, LeftT l4, List<RightT> r4, LeftT l5, List<RightT> r5)
      Creates a MultiRightPairList with five pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right elements of the first pair
      l2 - the left element of the second pair
      r2 - the right elements of the second pair
      l3 - the left element of the third pair
      r3 - the right elements of the third pair
      l4 - the left element of the fourth pair
      r4 - the right elements of the fourth pair
      l5 - the left element of the fifth pair
      r5 - the right elements of the fifth pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, List<RightT> r1, LeftT l2, List<RightT> r2, LeftT l3, List<RightT> r3, LeftT l4, List<RightT> r4, LeftT l5, List<RightT> r5, LeftT l6, List<RightT> r6)
      Creates a MultiRightPairList with six pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right elements of the first pair
      l2 - the left element of the second pair
      r2 - the right elements of the second pair
      l3 - the left element of the third pair
      r3 - the right elements of the third pair
      l4 - the left element of the fourth pair
      r4 - the right elements of the fourth pair
      l5 - the left element of the fifth pair
      r5 - the right elements of the fifth pair
      l6 - the left element of the sixth pair
      r6 - the right elements of the sixth pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, List<RightT> r1, LeftT l2, List<RightT> r2, LeftT l3, List<RightT> r3, LeftT l4, List<RightT> r4, LeftT l5, List<RightT> r5, LeftT l6, List<RightT> r6, LeftT l7, List<RightT> r7)
      Creates a MultiRightPairList with seven pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right elements of the first pair
      l2 - the left element of the second pair
      r2 - the right elements of the second pair
      l3 - the left element of the third pair
      r3 - the right elements of the third pair
      l4 - the left element of the fourth pair
      r4 - the right elements of the fourth pair
      l5 - the left element of the fifth pair
      r5 - the right elements of the fifth pair
      l6 - the left element of the sixth pair
      r6 - the right elements of the sixth pair
      l7 - the left element of the seventh pair
      r7 - the right elements of the seventh pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, List<RightT> r1, LeftT l2, List<RightT> r2, LeftT l3, List<RightT> r3, LeftT l4, List<RightT> r4, LeftT l5, List<RightT> r5, LeftT l6, List<RightT> r6, LeftT l7, List<RightT> r7, LeftT l8, List<RightT> r8)
      Creates a MultiRightPairList with eight pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right elements of the first pair
      l2 - the left element of the second pair
      r2 - the right elements of the second pair
      l3 - the left element of the third pair
      r3 - the right elements of the third pair
      l4 - the left element of the fourth pair
      r4 - the right elements of the fourth pair
      l5 - the left element of the fifth pair
      r5 - the right elements of the fifth pair
      l6 - the left element of the sixth pair
      r6 - the right elements of the sixth pair
      l7 - the left element of the seventh pair
      r7 - the right elements of the seventh pair
      l8 - the left element of the eighth pair
      r8 - the right elements of the eighth pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, List<RightT> r1, LeftT l2, List<RightT> r2, LeftT l3, List<RightT> r3, LeftT l4, List<RightT> r4, LeftT l5, List<RightT> r5, LeftT l6, List<RightT> r6, LeftT l7, List<RightT> r7, LeftT l8, List<RightT> r8, LeftT l9, List<RightT> r9)
      Creates a MultiRightPairList with nine pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right elements of the first pair
      l2 - the left element of the second pair
      r2 - the right elements of the second pair
      l3 - the left element of the third pair
      r3 - the right elements of the third pair
      l4 - the left element of the fourth pair
      r4 - the right elements of the fourth pair
      l5 - the left element of the fifth pair
      r5 - the right elements of the fifth pair
      l6 - the left element of the sixth pair
      r6 - the right elements of the sixth pair
      l7 - the left element of the seventh pair
      r7 - the right elements of the seventh pair
      l8 - the left element of the eighth pair
      r8 - the right elements of the eighth pair
      l9 - the left element of the ninth pair
      r9 - the right elements of the ninth pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, List<RightT> r1, LeftT l2, List<RightT> r2, LeftT l3, List<RightT> r3, LeftT l4, List<RightT> r4, LeftT l5, List<RightT> r5, LeftT l6, List<RightT> r6, LeftT l7, List<RightT> r7, LeftT l8, List<RightT> r8, LeftT l9, List<RightT> r9, LeftT l10, List<RightT> r10)
      Creates a MultiRightPairList with ten pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right elements of the first pair
      l2 - the left element of the second pair
      r2 - the right elements of the second pair
      l3 - the left element of the third pair
      r3 - the right elements of the third pair
      l4 - the left element of the fourth pair
      r4 - the right elements of the fourth pair
      l5 - the left element of the fifth pair
      r5 - the right elements of the fifth pair
      l6 - the left element of the sixth pair
      r6 - the right elements of the sixth pair
      l7 - the left element of the seventh pair
      r7 - the right elements of the seventh pair
      l8 - the left element of the eighth pair
      r8 - the right elements of the eighth pair
      l9 - the left element of the ninth pair
      r9 - the right elements of the ninth pair
      l10 - the left element of the tenth pair
      r10 - the right elements of the tenth pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, RightT r1)
      Creates a MultiRightPairList with a single pair.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right element of the first pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pair
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, RightT r1, LeftT l2, RightT r2)
      Creates a MultiRightPairList with two pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right element of the first pair
      l2 - the left element of the second pair
      r2 - the right element of the second pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, RightT r1, LeftT l2, RightT r2, LeftT l3, RightT r3)
      Creates a MultiRightPairList with three pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right element of the first pair
      l2 - the left element of the second pair
      r2 - the right element of the second pair
      l3 - the left element of the third pair
      r3 - the right element of the third pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, RightT r1, LeftT l2, RightT r2, LeftT l3, RightT r3, LeftT l4, RightT r4)
      Creates a MultiRightPairList with four pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right element of the first pair
      l2 - the left element of the second pair
      r2 - the right element of the second pair
      l3 - the left element of the third pair
      r3 - the right element of the third pair
      l4 - the left element of the fourth pair
      r4 - the right element of the fourth pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, RightT r1, LeftT l2, RightT r2, LeftT l3, RightT r3, LeftT l4, RightT r4, LeftT l5, RightT r5)
      Creates a MultiRightPairList with five pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right element of the first pair
      l2 - the left element of the second pair
      r2 - the right element of the second pair
      l3 - the left element of the third pair
      r3 - the right element of the third pair
      l4 - the left element of the fourth pair
      r4 - the right element of the fourth pair
      l5 - the left element of the fifth pair
      r5 - the right element of the fifth pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, RightT r1, LeftT l2, RightT r2, LeftT l3, RightT r3, LeftT l4, RightT r4, LeftT l5, RightT r5, LeftT l6, RightT r6)
      Creates a MultiRightPairList with six pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right element of the first pair
      l2 - the left element of the second pair
      r2 - the right element of the second pair
      l3 - the left element of the third pair
      r3 - the right element of the third pair
      l4 - the left element of the fourth pair
      r4 - the right element of the fourth pair
      l5 - the left element of the fifth pair
      r5 - the right element of the fifth pair
      l6 - the left element of the sixth pair
      r6 - the right element of the sixth pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, RightT r1, LeftT l2, RightT r2, LeftT l3, RightT r3, LeftT l4, RightT r4, LeftT l5, RightT r5, LeftT l6, RightT r6, LeftT l7, RightT r7)
      Creates a MultiRightPairList with seven pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right element of the first pair
      l2 - the left element of the second pair
      r2 - the right element of the second pair
      l3 - the left element of the third pair
      r3 - the right element of the third pair
      l4 - the left element of the fourth pair
      r4 - the right element of the fourth pair
      l5 - the left element of the fifth pair
      r5 - the right element of the fifth pair
      l6 - the left element of the sixth pair
      r6 - the right element of the sixth pair
      l7 - the left element of the seventh pair
      r7 - the right element of the seventh pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, RightT r1, LeftT l2, RightT r2, LeftT l3, RightT r3, LeftT l4, RightT r4, LeftT l5, RightT r5, LeftT l6, RightT r6, LeftT l7, RightT r7, LeftT l8, RightT r8)
      Creates a MultiRightPairList with eight pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right element of the first pair
      l2 - the left element of the second pair
      r2 - the right element of the second pair
      l3 - the left element of the third pair
      r3 - the right element of the third pair
      l4 - the left element of the fourth pair
      r4 - the right element of the fourth pair
      l5 - the left element of the fifth pair
      r5 - the right element of the fifth pair
      l6 - the left element of the sixth pair
      r6 - the right element of the sixth pair
      l7 - the left element of the seventh pair
      r7 - the right element of the seventh pair
      l8 - the left element of the eighth pair
      r8 - the right element of the eighth pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, RightT r1, LeftT l2, RightT r2, LeftT l3, RightT r3, LeftT l4, RightT r4, LeftT l5, RightT r5, LeftT l6, RightT r6, LeftT l7, RightT r7, LeftT l8, RightT r8, LeftT l9, RightT r9)
      Creates a MultiRightPairList with nine pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right element of the first pair
      l2 - the left element of the second pair
      r2 - the right element of the second pair
      l3 - the left element of the third pair
      r3 - the right element of the third pair
      l4 - the left element of the fourth pair
      r4 - the right element of the fourth pair
      l5 - the left element of the fifth pair
      r5 - the right element of the fifth pair
      l6 - the left element of the sixth pair
      r6 - the right element of the sixth pair
      l7 - the left element of the seventh pair
      r7 - the right element of the seventh pair
      l8 - the left element of the eighth pair
      r8 - the right element of the eighth pair
      l9 - the left element of the ninth pair
      r9 - the right element of the ninth pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs
    • of

      public static <LeftT, RightT> MultiRightPairList<LeftT,RightT> of(LeftT l1, RightT r1, LeftT l2, RightT r2, LeftT l3, RightT r3, LeftT l4, RightT r4, LeftT l5, RightT r5, LeftT l6, RightT r6, LeftT l7, RightT r7, LeftT l8, RightT r8, LeftT l9, RightT r9, LeftT l10, RightT r10)
      Creates a MultiRightPairList with ten pairs.
      Typparameter:
      LeftT - the type of the left elements in the pairs
      RightT - the type of the right elements in the pairs
      Parameter:
      l1 - the left element of the first pair
      r1 - the right element of the first pair
      l2 - the left element of the second pair
      r2 - the right element of the second pair
      l3 - the left element of the third pair
      r3 - the right element of the third pair
      l4 - the left element of the fourth pair
      r4 - the right element of the fourth pair
      l5 - the left element of the fifth pair
      r5 - the right element of the fifth pair
      l6 - the left element of the sixth pair
      r6 - the right element of the sixth pair
      l7 - the left element of the seventh pair
      r7 - the right element of the seventh pair
      l8 - the left element of the eighth pair
      r8 - the right element of the eighth pair
      l9 - the left element of the ninth pair
      r9 - the right element of the ninth pair
      l10 - the left element of the tenth pair
      r10 - the right element of the tenth pair
      Gibt zurück:
      a new MultiRightPairList containing the specified pairs