Class MultiItemCombination


  • public class MultiItemCombination
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      MultiItemCombineIterable streams​(java.lang.Iterable<? extends org.reactivestreams.Publisher<?>> iterable)
      Combines the items from multiple streams.
      <T1,​T2>
      MultiItemCombine2<T1,​T2>
      streams​(org.reactivestreams.Publisher<? extends T1> a, org.reactivestreams.Publisher<? extends T2> b)
      Combines the items from 2 streams.
      <T1,​T2,​T3>
      MultiItemCombine3<T1,​T2,​T3>
      streams​(org.reactivestreams.Publisher<? extends T1> a, org.reactivestreams.Publisher<? extends T2> b, org.reactivestreams.Publisher<? extends T3> c)
      Combines the items from 3 streams.
      <T1,​T2,​T3,​T4>
      MultiItemCombine4<T1,​T2,​T3,​T4>
      streams​(org.reactivestreams.Publisher<? extends T1> a, org.reactivestreams.Publisher<? extends T2> b, org.reactivestreams.Publisher<? extends T3> c, org.reactivestreams.Publisher<? extends T4> d)
      Combines the items from 4 streams.
      <T1,​T2,​T3,​T4,​T5>
      MultiItemCombine5<T1,​T2,​T3,​T4,​T5>
      streams​(org.reactivestreams.Publisher<? extends T1> a, org.reactivestreams.Publisher<? extends T2> b, org.reactivestreams.Publisher<? extends T3> c, org.reactivestreams.Publisher<? extends T4> d, org.reactivestreams.Publisher<? extends T5> e)
      Combines the items from 5 streams.
      <T1,​T2,​T3,​T4,​T5,​T6>
      MultiItemCombine6<T1,​T2,​T3,​T4,​T5,​T6>
      streams​(org.reactivestreams.Publisher<? extends T1> a, org.reactivestreams.Publisher<? extends T2> b, org.reactivestreams.Publisher<? extends T3> c, org.reactivestreams.Publisher<? extends T4> d, org.reactivestreams.Publisher<? extends T5> e, org.reactivestreams.Publisher<? extends T6> f)
      Combines the items from 6 streams.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7>
      MultiItemCombine7<T1,​T2,​T3,​T4,​T5,​T6,​T7>
      streams​(org.reactivestreams.Publisher<? extends T1> a, org.reactivestreams.Publisher<? extends T2> b, org.reactivestreams.Publisher<? extends T3> c, org.reactivestreams.Publisher<? extends T4> d, org.reactivestreams.Publisher<? extends T5> e, org.reactivestreams.Publisher<? extends T6> f, org.reactivestreams.Publisher<? extends T7> g)
      Combines the items from 7 streams.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8>
      MultiItemCombine8<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8>
      streams​(org.reactivestreams.Publisher<? extends T1> a, org.reactivestreams.Publisher<? extends T2> b, org.reactivestreams.Publisher<? extends T3> c, org.reactivestreams.Publisher<? extends T4> d, org.reactivestreams.Publisher<? extends T5> e, org.reactivestreams.Publisher<? extends T6> f, org.reactivestreams.Publisher<? extends T7> g, org.reactivestreams.Publisher<? extends T8> h)
      Combines the items from 8 streams.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9>
      MultiItemCombine9<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9>
      streams​(org.reactivestreams.Publisher<? extends T1> a, org.reactivestreams.Publisher<? extends T2> b, org.reactivestreams.Publisher<? extends T3> c, org.reactivestreams.Publisher<? extends T4> d, org.reactivestreams.Publisher<? extends T5> e, org.reactivestreams.Publisher<? extends T6> f, org.reactivestreams.Publisher<? extends T7> g, org.reactivestreams.Publisher<? extends T8> h, org.reactivestreams.Publisher<? extends T9> i)
      Combines the items from 9 streams.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MultiItemCombination

        public MultiItemCombination()
    • Method Detail

      • streams

        @CheckReturnValue
        public <T1,​T2> MultiItemCombine2<T1,​T2> streams​(org.reactivestreams.Publisher<? extends T1> a,
                                                                    org.reactivestreams.Publisher<? extends T2> b)
        Combines the items from 2 streams.
        Type Parameters:
        T1 - the type of item from the first stream
        T2 - the type of item from the second stream
        Parameters:
        a - the first stream, must not be null
        b - the second stream, must not be null
        Returns:
        the object to configure the combination process
      • streams

        @CheckReturnValue
        public <T1,​T2,​T3> MultiItemCombine3<T1,​T2,​T3> streams​(org.reactivestreams.Publisher<? extends T1> a,
                                                                                      org.reactivestreams.Publisher<? extends T2> b,
                                                                                      org.reactivestreams.Publisher<? extends T3> c)
        Combines the items from 3 streams.
        Type Parameters:
        T1 - the type of item from the first stream
        T2 - the type of item from the second stream
        T3 - the type of item from the third stream
        Parameters:
        a - the first stream, must not be null
        b - the second stream, must not be null
        c - the third stream, must not be null
        Returns:
        the object to configure the combination process
      • streams

        @CheckReturnValue
        public <T1,​T2,​T3,​T4> MultiItemCombine4<T1,​T2,​T3,​T4> streams​(org.reactivestreams.Publisher<? extends T1> a,
                                                                                                        org.reactivestreams.Publisher<? extends T2> b,
                                                                                                        org.reactivestreams.Publisher<? extends T3> c,
                                                                                                        org.reactivestreams.Publisher<? extends T4> d)
        Combines the items from 4 streams.
        Type Parameters:
        T1 - the type of item from the first stream
        T2 - the type of item from the second stream
        T3 - the type of item from the third stream
        T4 - the type of item from the fourth stream
        Parameters:
        a - the first stream, must not be null
        b - the second stream, must not be null
        c - the third stream, must not be null
        d - the fourth stream, must not be null
        Returns:
        the object to configure the combination process
      • streams

        @CheckReturnValue
        public <T1,​T2,​T3,​T4,​T5> MultiItemCombine5<T1,​T2,​T3,​T4,​T5> streams​(org.reactivestreams.Publisher<? extends T1> a,
                                                                                                                          org.reactivestreams.Publisher<? extends T2> b,
                                                                                                                          org.reactivestreams.Publisher<? extends T3> c,
                                                                                                                          org.reactivestreams.Publisher<? extends T4> d,
                                                                                                                          org.reactivestreams.Publisher<? extends T5> e)
        Combines the items from 5 streams.
        Type Parameters:
        T1 - the type of item from the first stream
        T2 - the type of item from the second stream
        T3 - the type of item from the third stream
        T4 - the type of item from the fourth stream
        T5 - the type of item from the fifth stream
        Parameters:
        a - the first stream, must not be null
        b - the second stream, must not be null
        c - the third stream, must not be null
        d - the fourth stream, must not be null
        e - the fifth stream, must not be null
        Returns:
        the object to configure the combination process
      • streams

        @CheckReturnValue
        public <T1,​T2,​T3,​T4,​T5,​T6> MultiItemCombine6<T1,​T2,​T3,​T4,​T5,​T6> streams​(org.reactivestreams.Publisher<? extends T1> a,
                                                                                                                                            org.reactivestreams.Publisher<? extends T2> b,
                                                                                                                                            org.reactivestreams.Publisher<? extends T3> c,
                                                                                                                                            org.reactivestreams.Publisher<? extends T4> d,
                                                                                                                                            org.reactivestreams.Publisher<? extends T5> e,
                                                                                                                                            org.reactivestreams.Publisher<? extends T6> f)
        Combines the items from 6 streams.
        Type Parameters:
        T1 - the type of item from the first stream
        T2 - the type of item from the second stream
        T3 - the type of item from the third stream
        T4 - the type of item from the fourth stream
        T5 - the type of item from the fifth stream
        T6 - the type of item from the sixth stream
        Parameters:
        a - the first stream, must not be null
        b - the second stream, must not be null
        c - the third stream, must not be null
        d - the fourth stream, must not be null
        e - the fifth stream, must not be null
        f - the sixth stream, must not be null
        Returns:
        the object to configure the combination process
      • streams

        @CheckReturnValue
        public <T1,​T2,​T3,​T4,​T5,​T6,​T7> MultiItemCombine7<T1,​T2,​T3,​T4,​T5,​T6,​T7> streams​(org.reactivestreams.Publisher<? extends T1> a,
                                                                                                                                                              org.reactivestreams.Publisher<? extends T2> b,
                                                                                                                                                              org.reactivestreams.Publisher<? extends T3> c,
                                                                                                                                                              org.reactivestreams.Publisher<? extends T4> d,
                                                                                                                                                              org.reactivestreams.Publisher<? extends T5> e,
                                                                                                                                                              org.reactivestreams.Publisher<? extends T6> f,
                                                                                                                                                              org.reactivestreams.Publisher<? extends T7> g)
        Combines the items from 7 streams.
        Type Parameters:
        T1 - the type of item from the first stream
        T2 - the type of item from the second stream
        T3 - the type of item from the third stream
        T4 - the type of item from the fourth stream
        T5 - the type of item from the fifth stream
        T6 - the type of item from the sixth stream
        T7 - the type of item from the seventh stream
        Parameters:
        a - the first stream, must not be null
        b - the second stream, must not be null
        c - the third stream, must not be null
        d - the fourth stream, must not be null
        e - the fifth stream, must not be null
        f - the sixth stream, must not be null
        g - the seventh stream, must not be null
        Returns:
        the object to configure the combination process
      • streams

        @CheckReturnValue
        public <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8> MultiItemCombine8<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8> streams​(org.reactivestreams.Publisher<? extends T1> a,
                                                                                                                                                                                org.reactivestreams.Publisher<? extends T2> b,
                                                                                                                                                                                org.reactivestreams.Publisher<? extends T3> c,
                                                                                                                                                                                org.reactivestreams.Publisher<? extends T4> d,
                                                                                                                                                                                org.reactivestreams.Publisher<? extends T5> e,
                                                                                                                                                                                org.reactivestreams.Publisher<? extends T6> f,
                                                                                                                                                                                org.reactivestreams.Publisher<? extends T7> g,
                                                                                                                                                                                org.reactivestreams.Publisher<? extends T8> h)
        Combines the items from 8 streams.
        Type Parameters:
        T1 - the type of item from the first stream
        T2 - the type of item from the second stream
        T3 - the type of item from the third stream
        T4 - the type of item from the fourth stream
        T5 - the type of item from the fifth stream
        T6 - the type of item from the sixth stream
        T7 - the type of item from the seventh stream
        T8 - the type of item from the eighth stream
        Parameters:
        a - the first stream, must not be null
        b - the second stream, must not be null
        c - the third stream, must not be null
        d - the fourth stream, must not be null
        e - the fifth stream, must not be null
        f - the sixth stream, must not be null
        g - the seventh stream, must not be null
        h - the eighth stream, must not be null
        Returns:
        the object to configure the combination process
      • streams

        @CheckReturnValue
        public <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9> MultiItemCombine9<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9> streams​(org.reactivestreams.Publisher<? extends T1> a,
                                                                                                                                                                                                  org.reactivestreams.Publisher<? extends T2> b,
                                                                                                                                                                                                  org.reactivestreams.Publisher<? extends T3> c,
                                                                                                                                                                                                  org.reactivestreams.Publisher<? extends T4> d,
                                                                                                                                                                                                  org.reactivestreams.Publisher<? extends T5> e,
                                                                                                                                                                                                  org.reactivestreams.Publisher<? extends T6> f,
                                                                                                                                                                                                  org.reactivestreams.Publisher<? extends T7> g,
                                                                                                                                                                                                  org.reactivestreams.Publisher<? extends T8> h,
                                                                                                                                                                                                  org.reactivestreams.Publisher<? extends T9> i)
        Combines the items from 9 streams.
        Type Parameters:
        T1 - the type of item from the first stream
        T2 - the type of item from the second stream
        T3 - the type of item from the third stream
        T4 - the type of item from the fourth stream
        T5 - the type of item from the fifth stream
        T6 - the type of item from the sixth stream
        T7 - the type of item from the seventh stream
        T8 - the type of item from the eighth stream
        T9 - the type of item from the ninth stream
        Parameters:
        a - the first stream, must not be null
        b - the second stream, must not be null
        c - the third stream, must not be null
        d - the fourth stream, must not be null
        e - the fifth stream, must not be null
        f - the sixth stream, must not be null
        g - the seventh stream, must not be null
        h - the eighth stream, must not be null
        i - the ninth stream, must not be null
        Returns:
        the object to configure the combination process
      • streams

        @CheckReturnValue
        public MultiItemCombineIterable streams​(java.lang.Iterable<? extends org.reactivestreams.Publisher<?>> iterable)
        Combines the items from multiple streams.

        If you pass no publishers, the resulting Multi emits the completion event immediately after subscription. If you pass a single publisher, it calls the combination logic for every item from this stream (wrapped in a list of a single element). The resulting Multi emits the result from that combination logic. If you pass multiple publishers, it calls the combination logic for every group of items (1 per upstream publisher) wrapped in a list. The resulting Multi emits the result of that combination logic.

        As soon as one of the publisher completes, the combination completes and the completion event is emitted. If any of the publisher emits a failure, the failure is passed downstream and the combination stops.

        Parameters:
        iterable - the iterable containing the streams to combine. Must not be null
        Returns:
        the object to configure the combination process