Module mutiny.zero

Class Concatenate<T>

  • Type Parameters:
    T - the elements type
    All Implemented Interfaces:
    java.util.concurrent.Flow.Publisher<T>

    public class Concatenate<T>
    extends java.lang.Object
    implements java.util.concurrent.Flow.Publisher<T>
    A Flow.Publisher that is the concatenation of several ones.

    The first publisher in the list is the first to be subscribed. Once it completes the next one is subscribed and so on, up to the completion of the last one.

    If any publisher sends an error signal then the concatenation stream ends with that error.

    • Constructor Summary

      Constructors 
      Constructor Description
      Concatenate​(java.util.List<java.util.concurrent.Flow.Publisher<T>> publishers)
      Create a new concatenation publisher.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void subscribe​(java.util.concurrent.Flow.Subscriber<? super T> subscriber)  
      • Methods inherited from class java.lang.Object

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

      • Concatenate

        public Concatenate​(java.util.List<java.util.concurrent.Flow.Publisher<T>> publishers)
        Create a new concatenation publisher.
        Parameters:
        publishers - the list of publishers, must not be null, must not contain null
    • Method Detail

      • subscribe

        public void subscribe​(java.util.concurrent.Flow.Subscriber<? super T> subscriber)
        Specified by:
        subscribe in interface java.util.concurrent.Flow.Publisher<T>