Class MedianOperator<T extends java.lang.Number & java.lang.Comparable<T>>

  • All Implemented Interfaces:
    java.util.function.Function<Multi<T>,​Multi<java.lang.Double>>

    public class MedianOperator<T extends java.lang.Number & java.lang.Comparable<T>>
    extends java.lang.Object
    implements java.util.function.Function<Multi<T>,​Multi<java.lang.Double>>
    Median operator emitting the median all all the item emitter by the upstream.

    Everytime it gets an item from upstream, it emits the median of the already received items. If the stream emits the completion event without having emitting any item before, the completion event is emitted. If the upstream emits a failure, then, the failure is propagated.

    • Constructor Summary

      Constructors 
      Constructor Description
      MedianOperator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Multi<java.lang.Double> apply​(Multi<T> multi)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Constructor Detail

      • MedianOperator

        public MedianOperator()
    • Method Detail

      • apply

        public Multi<java.lang.Double> apply​(Multi<T> multi)
        Specified by:
        apply in interface java.util.function.Function<Multi<T extends java.lang.Number & java.lang.Comparable<T>>,​Multi<java.lang.Double>>