commons-statistics-descriptive/src/main/java/org/apache/commons/statistics/descriptive/IntStatistics.java [553:608]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public long getAsLong(Statistic statistic) {
        return getResult(statistic).getAsLong();
    }

    /**
     * Gets the value of the specified {@code statistic} as a {@code BigInteger}.
     *
     * <p>Use this method to access the {@code BigInteger} result for exact integer statistics,
     * for example {@link Statistic#SUM_OF_SQUARES}.
     *
     * <p>Note: This method may throw an {@link ArithmeticException} if the result
     * is not finite.
     *
     * @param statistic Statistic.
     * @return the value
     * @throws IllegalArgumentException if the {@code statistic} is not supported
     * @throws ArithmeticException if the {@code result} is not finite
     * @see #isSupported(Statistic)
     * @see #getResult(Statistic)
     */
    public BigInteger getAsBigInteger(Statistic statistic) {
        return getResult(statistic).getAsBigInteger();
    }

    /**
     * Gets a supplier for the value of the specified {@code statistic}.
     *
     * <p>The returned function will supply the correct result after
     * calls to {@link #accept(int) accept} or
     * {@link #combine(IntStatistics) combine} further values into
     * {@code this} instance.
     *
     * <p>This method can be used to perform a one-time look-up of the statistic
     * function to compute statistics as values are dynamically added.
     *
     * @param statistic Statistic.
     * @return the supplier
     * @throws IllegalArgumentException if the {@code statistic} is not supported
     * @see #isSupported(Statistic)
     * @see #getAsDouble(Statistic)
     */
    public StatisticResult getResult(Statistic statistic) {
        // Locate the implementation.
        // Statistics that wrap an underlying implementation are created in methods.
        // The return argument should be an interface reference and not an instance
        // of IntStatistic. This ensures the statistic implementation cannot
        // be updated with new values by casting the result and calling accept(int).
        StatisticResult stat = null;
        switch (statistic) {
        case GEOMETRIC_MEAN:
            stat = getGeometricMean();
            break;
        case KURTOSIS:
            stat = getKurtosis();
            break;
        case MAX:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



commons-statistics-descriptive/src/main/java/org/apache/commons/statistics/descriptive/LongStatistics.java [531:586]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public long getAsLong(Statistic statistic) {
        return getResult(statistic).getAsLong();
    }

    /**
     * Gets the value of the specified {@code statistic} as a {@code BigInteger}.
     *
     * <p>Use this method to access the {@code BigInteger} result for exact integer statistics,
     * for example {@link Statistic#SUM_OF_SQUARES}.
     *
     * <p>Note: This method may throw an {@link ArithmeticException} if the result
     * is not finite.
     *
     * @param statistic Statistic.
     * @return the value
     * @throws IllegalArgumentException if the {@code statistic} is not supported
     * @throws ArithmeticException if the {@code result} is not finite
     * @see #isSupported(Statistic)
     * @see #getResult(Statistic)
     */
    public BigInteger getAsBigInteger(Statistic statistic) {
        return getResult(statistic).getAsBigInteger();
    }

    /**
     * Gets a supplier for the value of the specified {@code statistic}.
     *
     * <p>The returned function will supply the correct result after
     * calls to {@link #accept(long) accept} or
     * {@link #combine(LongStatistics) combine} further values into
     * {@code this} instance.
     *
     * <p>This method can be used to perform a one-time look-up of the statistic
     * function to compute statistics as values are dynamically added.
     *
     * @param statistic Statistic.
     * @return the supplier
     * @throws IllegalArgumentException if the {@code statistic} is not supported
     * @see #isSupported(Statistic)
     * @see #getAsDouble(Statistic)
     */
    public StatisticResult getResult(Statistic statistic) {
        // Locate the implementation.
        // Statistics that wrap an underlying implementation are created in methods.
        // The return argument should be an interface reference and not an instance
        // of LongStatistic. This ensures the statistic implementation cannot
        // be updated with new values by casting the result and calling accept(long).
        StatisticResult stat = null;
        switch (statistic) {
        case GEOMETRIC_MEAN:
            stat = getGeometricMean();
            break;
        case KURTOSIS:
            stat = getKurtosis();
            break;
        case MAX:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



