Class LocalizedNumberRangeFormatter

    • Method Detail

      • formatRange

        public FormattedNumberRange formatRange​(int first,
                                                int second)
        Format the given integers to a string using the settings specified in the NumberRangeFormatter fluent setting chain.
        Parameters:
        first - The first number in the range, usually to the left in LTR locales.
        second - The second number in the range, usually to the right in LTR locales.
        Returns:
        A FormattedNumberRange object; call .toString() to get the string.
        See Also:
        NumberRangeFormatter
      • formatRange

        public FormattedNumberRange formatRange​(double first,
                                                double second)
        Format the given doubles to a string using the settings specified in the NumberRangeFormatter fluent setting chain.
        Parameters:
        first - The first number in the range, usually to the left in LTR locales.
        second - The second number in the range, usually to the right in LTR locales.
        Returns:
        A FormattedNumberRange object; call .toString() to get the string.
        See Also:
        NumberRangeFormatter
      • formatRange

        public FormattedNumberRange formatRange​(java.lang.Number first,
                                                java.lang.Number second)
        Format the given Numbers to a string using the settings specified in the NumberRangeFormatter fluent setting chain.
        Parameters:
        first - The first number in the range, usually to the left in LTR locales.
        second - The second number in the range, usually to the right in LTR locales.
        Returns:
        A FormattedNumberRange object; call .toString() to get the string.
        See Also:
        NumberRangeFormatter