Module mutiny.zero

Class Select<T>

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

    public class Select<T>
    extends java.lang.Object
    implements java.util.concurrent.Flow.Publisher<T>
    A Flow.Publisher that selects elements matching a Predicate.
    • Constructor Summary

      Constructors 
      Constructor Description
      Select​(java.util.concurrent.Flow.Publisher<T> upstream, java.util.function.Predicate<T> predicate)
      Build a new selection 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

      • Select

        public Select​(java.util.concurrent.Flow.Publisher<T> upstream,
                      java.util.function.Predicate<T> predicate)
        Build a new selection publisher.
        Parameters:
        upstream - the upstream publisher
        predicate - the predicate to select the elements forwarded to subscribers, must not throw exceptions
    • 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>