Interface BigIntegerStatisticResult

  • All Superinterfaces:
    java.util.function.DoubleSupplier, java.util.function.IntSupplier, java.util.function.LongSupplier, StatisticResult
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    interface BigIntegerStatisticResult
    extends StatisticResult
    Represents the BigInteger result of a statistic computed over a set of values.

    This is a helper interface to map the native type of the expected value to other result types.

    Since:
    1.1
    • Method Detail

      • getAsBigInteger

        java.math.BigInteger getAsBigInteger()
        Description copied from interface: StatisticResult
        Gets a result as a BigInteger.

        The default implementation uses the closest representable BigInteger value of the DoubleSupplier.getAsDouble() result. In the event of ties the result is rounded towards positive infinity. This will raise an ArithmeticException if the result is not finite.

        Specified by:
        getAsBigInteger in interface StatisticResult
        Returns:
        a result
      • getAsDouble

        default double getAsDouble()
        Specified by:
        getAsDouble in interface java.util.function.DoubleSupplier
      • getAsInt

        default int getAsInt()
        Description copied from interface: StatisticResult

        The default implementation uses the closest representable int value of the DoubleSupplier.getAsDouble() result. In the event of ties the result is rounded towards positive infinity. This will raise an ArithmeticException if the closest integer result is not within the range [-2^31, 2^31).

        Specified by:
        getAsInt in interface java.util.function.IntSupplier
        Specified by:
        getAsInt in interface StatisticResult
      • getAsLong

        default long getAsLong()
        Description copied from interface: StatisticResult

        The default implementation uses the closest representable long value of the DoubleSupplier.getAsDouble() result. In the event of ties the result is rounded towards positive infinity. This will raise an ArithmeticException if the closest integer result is not within the range [-2^63, 2^63).

        Specified by:
        getAsLong in interface java.util.function.LongSupplier
        Specified by:
        getAsLong in interface StatisticResult