Class MathFluxExtensionsKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static <T extends Number> Mono<T> sumAll(Flux<T> $self) General purpose extension function to compute the sum of all values emitted by a Flux of Number and return it as a Mono.
      final static <T extends Any, R extends Number> Mono<R> sumAll(Flux<T> $self, Function1<T, R> mapper) General purpose extension function to map arbitrary values in a Flux to Numbers and return the sum of these Numbers as a Mono of Number.
      final static <T extends Number> Mono<Integer> sumAsInt(Flux<T> $self) Extension to compute the Int sum of all values emitted by a Flux of Number and return it as a Mono of Int.
      final static <T extends Number> Mono<Long> sumAsLong(Flux<T> $self) Extension to compute the Long sum of all values emitted by a Flux of Number and return it as a Mono of Long.
      final static <T extends Number> Mono<Float> sumAsFloat(Flux<T> $self) Extension to compute the Float sum of all values emitted by a Flux of Number and return it as a Mono of Float.
      final static <T extends Number> Mono<Double> sumAsDouble(Flux<T> $self) Extension to compute the Double sum of all values emitted by a Flux of Number and return it as a Mono of Double.
      final static <T extends Number> Mono<BigInteger> sumAsBigInt(Flux<T> $self) Extension to compute the BigInteger sum of all values emitted by a Flux of Number and return it as a Mono of BigInteger.
      final static <T extends Number> Mono<BigDecimal> sumAsBigDecimal(Flux<T> $self) Extension to compute the BigDecimal sum of all values emitted by a Flux of Number and return it as a Mono of BigDecimal.
      final static <T extends Number> Mono<T> averageAll(Flux<T> $self) General purpose extension function to compute the average of all values emitted by a Flux of Number and return it as a Mono.
      final static <T extends Any, R extends Number> Mono<R> averageAll(Flux<T> $self, Function1<T, R> mapper) General purpose extension function to map arbitrary values in a Flux to Numbers and return the average of these Numbers as a Mono of Number.
      final static <T extends Number> Mono<Float> averageAsFloat(Flux<T> $self) Extension to compute the Float average of all values emitted by a Flux of Number and return it as a Mono of Float.
      final static <T extends Number> Mono<Double> averageAsDouble(Flux<T> $self) Extension to compute the Double average of all values emitted by a Flux of Number and return it as a Mono of Double.
      final static <T extends Number> Mono<BigInteger> averageAsBigInt(Flux<T> $self) Extension to compute the BigInteger average of all values emitted by a Flux of Number and return it as a Mono of BigInteger.
      final static <T extends Number> Mono<BigDecimal> averageAsBigDecimal(Flux<T> $self) Extension to compute the BigDecimal average of all values emitted by a Flux of Number and return it as a Mono of BigDecimal.
      final static <T extends Comparable<T>> Mono<T> min(Flux<T> $self) Extension to find the lowest value in a Flux of Comparable values and return it as a Mono of T.
      final static <T extends Any> Mono<T> )>min(Flux<T> $self, <Error class: unknown class><T> comp) Extension to find the lowest value in a Flux and return it as a Mono.
      final static <T extends Any> Mono<T> min(Flux<T> $self, Function2<T, T, Integer> comp) Extension to find the lowest value in a Flux and return it as a Mono.
      final static <T extends Comparable<T>> Mono<T> max(Flux<T> $self) Extension to find the highest value in a Flux of Comparable values and return it as a Mono of T.
      final static <T extends Any> Mono<T> )>max(Flux<T> $self, <Error class: unknown class><T> comp) Extension to find the highest value in a Flux and return it as a Mono.
      final static <T extends Any> Mono<T> max(Flux<T> $self, Function2<T, T, Integer> comp) Extension to find the highest value in a Flux and return it as a Mono.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • sumAll

         final static <T extends Number> Mono<T> sumAll(Flux<T> $self)

        General purpose extension function to compute the sum of all values emitted by a Flux of Number and return it as a Mono. The resultant Mono will have the same Number type as the input Flux

        If the result type (or precision) needs to be changed then a specific sumAsType() method should be used in preference to this method. e.g. sumAsDouble() can be used to compute the sum as a Mono of Double

        Since:

        1.1.5

      • sumAll

         final static <T extends Any, R extends Number> Mono<R> sumAll(Flux<T> $self, Function1<T, R> mapper)

        General purpose extension function to map arbitrary values in a Flux to Numbers and return the sum of these Numbers as a Mono of Number. The resultant Mono will have the same Number type as the output of the mapping function

        If the result type (or precision) needs to be changed then a specific sumAsType() method should be used in preference to this method. e.g. sumAsDouble() can be used to compute the sum as a Mono of Double

        Parameters:
        mapper - a lambda converting values to Number
        Since:

        1.1.5

      • sumAsInt

         final static <T extends Number> Mono<Integer> sumAsInt(Flux<T> $self)

        Extension to compute the Int sum of all values emitted by a Flux of Number and return it as a Mono of Int.

        Note that numbers will be mapped to Int using Java standard conversions This may lead to arbitrary precision gain or loss if the source flux contains different types Please choose an appropriate method based on the expected types in the source flux.

        Since:

        1.1.5

      • sumAsLong

         final static <T extends Number> Mono<Long> sumAsLong(Flux<T> $self)

        Extension to compute the Long sum of all values emitted by a Flux of Number and return it as a Mono of Long.

        Note that numbers will be mapped to Long using Java standard conversions This may lead to arbitrary precision gain or loss if the source flux contains different types Please choose an appropriate method based on the expected types in the source flux.

        Since:

        1.1.5

      • sumAsFloat

         final static <T extends Number> Mono<Float> sumAsFloat(Flux<T> $self)

        Extension to compute the Float sum of all values emitted by a Flux of Number and return it as a Mono of Float.

        Note that numbers will be mapped to Float using Java standard conversions This may lead to arbitrary precision gain or loss if the source flux contains different types Please choose an appropriate method based on the expected types in the source flux.

        Since:

        1.1.5

      • sumAsDouble

         final static <T extends Number> Mono<Double> sumAsDouble(Flux<T> $self)

        Extension to compute the Double sum of all values emitted by a Flux of Number and return it as a Mono of Double.

        Note that numbers will be mapped to Double using Java standard conversions This may lead to arbitrary precision gain or loss if the source flux contains different types Please choose an appropriate method based on the expected types in the source flux.

        Since:

        1.1.5

      • sumAsBigInt

         final static <T extends Number> Mono<BigInteger> sumAsBigInt(Flux<T> $self)

        Extension to compute the BigInteger sum of all values emitted by a Flux of Number and return it as a Mono of BigInteger.

        Note that numbers will be mapped to BigInteger using Java standard conversions This may lead to arbitrary precision gain or loss if the source flux contains different types Please choose an appropriate method based on the expected types in the source flux.

        Since:

        1.1.5

      • sumAsBigDecimal

         final static <T extends Number> Mono<BigDecimal> sumAsBigDecimal(Flux<T> $self)

        Extension to compute the BigDecimal sum of all values emitted by a Flux of Number and return it as a Mono of BigDecimal.

        Note that numbers will be mapped to BigDecimal using Java standard conversions This may lead to arbitrary precision gain or loss if the source flux contains different types Please choose an appropriate method based on the expected types in the source flux.

        Since:

        1.1.5

      • averageAll

         final static <T extends Number> Mono<T> averageAll(Flux<T> $self)

        General purpose extension function to compute the average of all values emitted by a Flux of Number and return it as a Mono. The resultant Mono will have the same Number type as the input Flux

        If the result type (or precision) needs to be changed then a specific averageAsType() method should be used in preference to this method. e.g. averageAsDouble() can be used to compute the average as a Mono of Double

        Since:

        1.1.5

      • averageAll

         final static <T extends Any, R extends Number> Mono<R> averageAll(Flux<T> $self, Function1<T, R> mapper)

        General purpose extension function to map arbitrary values in a Flux to Numbers and return the average of these Numbers as a Mono of Number. The resultant Mono will have the same Number type as the output of the mapping function

        If the result type (or precision) needs to be changed then a specific averageAsType() method should be used in preference to this method. e.g. averageAsDouble() can be used to compute the average as a Mono of Double

        Parameters:
        mapper - a lambda converting values to Number
        Since:

        1.1.5

      • averageAsFloat

         final static <T extends Number> Mono<Float> averageAsFloat(Flux<T> $self)

        Extension to compute the Float average of all values emitted by a Flux of Number and return it as a Mono of Float.

        Note that numbers will be mapped to Float using Java standard conversions This may lead to arbitrary precision gain or loss if the source flux contains different types Please choose an appropriate method based on the expected types in the source flux.

        Since:

        1.1.5

      • averageAsDouble

         final static <T extends Number> Mono<Double> averageAsDouble(Flux<T> $self)

        Extension to compute the Double average of all values emitted by a Flux of Number and return it as a Mono of Double.

        Note that numbers will be mapped to Double using Java standard conversions This may lead to arbitrary precision gain or loss if the source flux contains different types Please choose an appropriate method based on the expected types in the source flux.

        Since:

        1.1.5

      • averageAsBigInt

         final static <T extends Number> Mono<BigInteger> averageAsBigInt(Flux<T> $self)

        Extension to compute the BigInteger average of all values emitted by a Flux of Number and return it as a Mono of BigInteger.

        Note that the result will be mapped to BigInteger and is likely to lose precision during the calculation of the average

        Since:

        1.1.5

      • min

         final static <T extends Comparable<T>> Mono<T> min(Flux<T> $self)

        Extension to find the lowest value in a Flux of Comparable values and return it as a Mono of T.

        Since:

        1.0.0

      • min

         final static <T extends Any> Mono<T> )>min(Flux<T> $self, <Error class: unknown class><T> comp)

        Extension to find the lowest value in a Flux and return it as a Mono. The lowest value is defined by comparisons made using a provided Comparator.

        Parameters:
        comp - The Comparator to use
        Since:

        1.0.0

      • min

         final static <T extends Any> Mono<T> min(Flux<T> $self, Function2<T, T, Integer> comp)

        Extension to find the lowest value in a Flux and return it as a Mono. The lowest value is defined by comparisons made using a provided function that behaves like a Comparator.

        Parameters:
        comp - The comparison function to use (similar to a Comparator)
        Since:

        1.0.0

      • max

         final static <T extends Comparable<T>> Mono<T> max(Flux<T> $self)

        Extension to find the highest value in a Flux of Comparable values and return it as a Mono of T.

        Since:

        1.0.0

      • max

         final static <T extends Any> Mono<T> )>max(Flux<T> $self, <Error class: unknown class><T> comp)

        Extension to find the highest value in a Flux and return it as a Mono. The highest value is defined by comparisons made using a provided Comparator.

        Parameters:
        comp - The Comparator to use
        Since:

        1.0.0

      • max

         final static <T extends Any> Mono<T> max(Flux<T> $self, Function2<T, T, Integer> comp)

        Extension to find the highest value in a Flux and return it as a Mono. The highest value is defined by comparisons made using a provided function that behaves like a Comparator.

        Parameters:
        comp - The comparison function to use (similar to a Comparator)
        Since:

        1.0.0