Module io.smallrye.mutiny.math
Package io.smallrye.mutiny.math
Class AverageOperator<T extends java.lang.Number>
- java.lang.Object
-
- io.smallrye.mutiny.math.AverageOperator<T>
-
public class AverageOperator<T extends java.lang.Number> extends java.lang.Object implements java.util.function.Function<Multi<T>,Multi<java.lang.Double>>
Average operator emitting the average of the items emitted by the upstream.Everytime it gets an item from upstream, it emits the average of the already received items. If the stream emits the completion event without having emitting any item before, 0 is emitted, followed by the completion event. If the upstream emits a failure, then, the failure is propagated.
-
-
Constructor Summary
Constructors Constructor Description AverageOperator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Multi<java.lang.Double>apply(Multi<T> multi)
-