Class Max

    • Method Detail

      • of

        public static Max of​(double... values)
        Returns an instance populated using the input values.

        The result is NaN if any of the values is NaN.

        When the input is an empty array, the result is negative infinity.

        Parameters:
        values - Values.
        Returns:
        Max instance.
      • ofRange

        public static Max ofRange​(double[] values,
                                  int from,
                                  int to)
        Returns an instance populated using the specified range of values.

        The result is NaN if any of the values is NaN.

        When the range is empty, the result is negative infinity.

        Parameters:
        values - Values.
        from - Inclusive start of the range.
        to - Exclusive end of the range.
        Returns:
        Max instance.
        Throws:
        IndexOutOfBoundsException - if the sub-range is out of bounds
        Since:
        1.2
      • accept

        public void accept​(double value)
        Updates the state of the statistic to reflect the addition of value.
        Specified by:
        accept in interface DoubleConsumer
        Parameters:
        value - Value.
      • combine

        public Max combine​(Max other)
        Description copied from interface: StatisticAccumulator
        Combines the state of the other statistic into this one.
        Specified by:
        combine in interface StatisticAccumulator<Max>
        Parameters:
        other - Another statistic to be combined.
        Returns:
        this instance after combining other.