Package mondrian.util

Class Format.NumericFormat

    • Field Detail

      • digitsLeftOfPoint

        final int digitsLeftOfPoint
      • zeroesLeftOfPoint

        final int zeroesLeftOfPoint
      • digitsRightOfPoint

        final int digitsRightOfPoint
      • zeroesRightOfPoint

        final int zeroesRightOfPoint
      • digitsRightOfExp

        final int digitsRightOfExp
      • zeroesRightOfExp

        final int zeroesRightOfExp
      • decimalShift

        int decimalShift
        Number of decimal places to shift the number left before formatting it: 2 means multiply by 100; -3 means divide by 1000.
      • expChar

        final char expChar
      • expSign

        final boolean expSign
      • useDecimal

        final boolean useDecimal
      • useThouSep

        final boolean useThouSep
      • cachedThousandSeparatorPositions

        final ArrayStack<Integer> cachedThousandSeparatorPositions
    • Constructor Detail

      • NumericFormat

        NumericFormat​(String token,
                      Format.FormatLocale locale,
                      int expFormat,
                      int digitsLeftOfPoint,
                      int zeroesLeftOfPoint,
                      int digitsRightOfPoint,
                      int zeroesRightOfPoint,
                      int digitsRightOfExp,
                      int zeroesRightOfExp,
                      boolean useDecimal,
                      boolean useThouSep,
                      String formatString)
    • Method Detail

      • isApplicableTo

        boolean isApplicableTo​(double n)
        Description copied from class: Format.BasicFormat
        Returns whether this format can handle a given value.

        Usually returns true; one notable exception is a format for negative numbers which causes the number to be underflow to zero and therefore be ineligible for the negative format.

        Overrides:
        isApplicableTo in class Format.BasicFormat
        Parameters:
        n - value
        Returns:
        Whether this format is applicable for a given value