Class Tuple4<T1,T2,T3,T4>

java.lang.Object
reactor.util.function.Tuple2<T1,T2>
reactor.util.function.Tuple3<T1,T2,T3>
reactor.util.function.Tuple4<T1,T2,T3,T4>
Type Parameters:
T1 - The type of the first non-null value held by this tuple
T2 - The type of the second non-null value held by this tuple
T3 - The type of the third non-null value held by this tuple
T4 - The type of the fourth non-null value held by this tuple
All Implemented Interfaces:
Serializable, Iterable<Object>
Direct Known Subclasses:
Tuple5

public class Tuple4<T1,T2,T3,T4> extends Tuple3<T1,T2,T3>
A tuple that holds four non-null values
Author:
Jon Brisbin, Stephane Maldini
See Also:
  • Method Details

    • getT4

      public T4 getT4()
      Type-safe way to get the fourth object of this Tuples.
      Returns:
      The fourth object
    • mapT1

      public <R> Tuple4<R,T2,T3,T4> mapT1(Function<T1,R> mapper)
      Map the 1st part (T1) of this Tuple4 into a different value and type, keeping the other parts.
      Overrides:
      mapT1 in class Tuple3<T1,T2,T3>
      Type Parameters:
      R - the new type for the T1 part
      Parameters:
      mapper - the mapping Function for the T1 part
      Returns:
      a new Tuple4 with a different T1 value
    • mapT2

      public <R> Tuple4<T1,R,T3,T4> mapT2(Function<T2,R> mapper)
      Map the 2nd part (T2) of this Tuple4 into a different value and type, keeping the other parts.
      Overrides:
      mapT2 in class Tuple3<T1,T2,T3>
      Type Parameters:
      R - the new type for the T2 part
      Parameters:
      mapper - the mapping Function for the T2 part
      Returns:
      a new Tuple4 with a different T2 value
    • mapT3

      public <R> Tuple4<T1,T2,R,T4> mapT3(Function<T3,R> mapper)
      Map the 3rd part (T3) of this Tuple4 into a different value and type, keeping the other parts.
      Overrides:
      mapT3 in class Tuple3<T1,T2,T3>
      Type Parameters:
      R - the new type for the T3 part
      Parameters:
      mapper - the mapping Function for the T3 part
      Returns:
      a new Tuple4 with a different T3 value
    • mapT4

      public <R> Tuple4<T1,T2,T3,R> mapT4(Function<T4,R> mapper)
      Map the 4th part (T4) of this Tuple4 into a different value and type, keeping the other parts.
      Type Parameters:
      R - the new type for the T4 part
      Parameters:
      mapper - the mapping Function for the T4 part
      Returns:
      a new Tuple4 with a different T4 value
    • get

      public @Nullable Object get(int index)
      Description copied from class: Tuple2
      Get the object at the given index.
      Overrides:
      get in class Tuple3<T1,T2,T3>
      Parameters:
      index - The index of the object to retrieve. Starts at 0.
      Returns:
      The object or null if out of bounds.
    • toArray

      public Object[] toArray()
      Description copied from class: Tuple2
      Turn this Tuple into a plain Object[]. The array isn't tied to this Tuple but is a copy.
      Overrides:
      toArray in class Tuple3<T1,T2,T3>
      Returns:
      A copy of the tuple as a new Object[].
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Tuple3<T1,T2,T3>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Tuple3<T1,T2,T3>
    • size

      public int size()
      Description copied from class: Tuple2
      Return the number of elements in this Tuples.
      Overrides:
      size in class Tuple3<T1,T2,T3>
      Returns:
      The size of this Tuples.