Class Tuple3<T1,T2,T3>

java.lang.Object
reactor.util.function.Tuple2<T1,T2>
reactor.util.function.Tuple3<T1,T2,T3>
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
All Implemented Interfaces:
Serializable, Iterable<Object>
Direct Known Subclasses:
Tuple4

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

    • getT3

      public T3 getT3()
      Type-safe way to get the third object of this Tuples.
      Returns:
      The third object
    • mapT1

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

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

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

      public @Nullable Object get(int index)
      Description copied from class: Tuple2
      Get the object at the given index.
      Overrides:
      get in class Tuple2<T1,T2>
      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 Tuple2<T1,T2>
      Returns:
      A copy of the tuple as a new Object[].
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Tuple2<T1,T2>
    • size

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

      public int hashCode()
      Overrides:
      hashCode in class Tuple2<T1,T2>