Class Tuple4<T1,​T2,​T3,​T4>

  • All Implemented Interfaces:
    Tuple, java.lang.Iterable<java.lang.Object>
    Direct Known Subclasses:
    Tuple5

    public class Tuple4<T1,​T2,​T3,​T4>
    extends Tuple3<T1,​T2,​T3>
    implements Tuple
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.Object> asList()
      Gets a List of Objects containing the items composing this Tuple
      boolean equals​(java.lang.Object o)  
      T4 getItem4()  
      int hashCode()  
      <T> Tuple4<T,​T2,​T3,​T4> mapItem1​(java.util.function.Function<T1,​T> mapper)
      Applies a mapper function to the left (item1) part of this Tuple2 to produce a new Tuple2.
      <T> Tuple4<T1,​T,​T3,​T4> mapItem2​(java.util.function.Function<T2,​T> mapper)
      Applies a mapper function to the right part (item2) of this Tuple2 to produce a new Tuple2.
      <T> Tuple4<T1,​T2,​T,​T4> mapItem3​(java.util.function.Function<T3,​T> mapper)  
      <T> Tuple4<T1,​T2,​T3,​T> mapItem4​(java.util.function.Function<T4,​T> mapper)  
      java.lang.Object nth​(int index)
      Get the item stored at the given index.
      static <T1,​T2,​T3,​T4>
      Tuple4<T1,​T2,​T3,​T4>
      of​(T1 a, T2 b, T3 c, T4 d)  
      int size()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
      • Methods inherited from interface io.smallrye.mutiny.tuples.Tuple

        iterator
    • Method Detail

      • of

        public static <T1,​T2,​T3,​T4> Tuple4<T1,​T2,​T3,​T4> of​(T1 a,
                                                                                               T2 b,
                                                                                               T3 c,
                                                                                               T4 d)
      • getItem4

        public T4 getItem4()
      • nth

        public java.lang.Object nth​(int index)
        Description copied from interface: Tuple
        Get the item stored at the given index.
        Specified by:
        nth in interface Tuple
        Overrides:
        nth in class Tuple3<T1,​T2,​T3>
        Parameters:
        index - The index of the item to retrieve.
        Returns:
        The item, can be null
      • mapItem1

        public <T> Tuple4<T,​T2,​T3,​T4> mapItem1​(java.util.function.Function<T1,​T> mapper)
        Description copied from class: Tuple2
        Applies a mapper function to the left (item1) part of this Tuple2 to produce a new Tuple2. The right part (item2) is not modified.
        Overrides:
        mapItem1 in class Tuple3<T1,​T2,​T3>
        Type Parameters:
        T - the new type for the left item
        Parameters:
        mapper - the mapping Function for the left item
        Returns:
        the new Tuple2
      • mapItem2

        public <T> Tuple4<T1,​T,​T3,​T4> mapItem2​(java.util.function.Function<T2,​T> mapper)
        Description copied from class: Tuple2
        Applies a mapper function to the right part (item2) of this Tuple2 to produce a new Tuple2. The left (item1) part is not modified.
        Overrides:
        mapItem2 in class Tuple3<T1,​T2,​T3>
        Type Parameters:
        T - the new type for the right item
        Parameters:
        mapper - the mapping Function for the right item
        Returns:
        the new Tuple2
      • mapItem4

        public <T> Tuple4<T1,​T2,​T3,​T> mapItem4​(java.util.function.Function<T4,​T> mapper)
      • asList

        public java.util.List<java.lang.Object> asList()
        Description copied from interface: Tuple
        Gets a List of Objects containing the items composing this Tuple
        Specified by:
        asList in interface Tuple
        Overrides:
        asList in class Tuple3<T1,​T2,​T3>
        Returns:
        A list containing the item of the tuple.
      • size

        public int size()
        Specified by:
        size in interface Tuple
        Overrides:
        size in class Tuple3<T1,​T2,​T3>
        Returns:
        the number of items stored in the Tuple
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class Tuple3<T1,​T2,​T3>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Tuple3<T1,​T2,​T3>