Package mondrian.util

Class Format.BasicFormat

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) int code  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void format​(double d, java.lang.StringBuilder buf)  
      (package private) void format​(long n, java.lang.StringBuilder buf)  
      (package private) void format​(java.lang.String s, java.lang.StringBuilder buf)  
      (package private) void format​(java.util.Calendar calendar, java.lang.StringBuilder buf)  
      (package private) void format​(java.util.Date date, java.lang.StringBuilder buf)  
      (package private) void formatNull​(java.lang.StringBuilder buf)  
      (package private) mondrian.util.Format.FormatType getFormatType()  
      (package private) boolean isApplicableTo​(double n)
      Returns whether this format can handle a given value.
      (package private) boolean isApplicableTo​(long n)
      Returns whether this format can handle a given value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • code

        final int code
    • Constructor Detail

      • BasicFormat

        BasicFormat()
      • BasicFormat

        BasicFormat​(int code)
    • Method Detail

      • getFormatType

        mondrian.util.Format.FormatType getFormatType()
      • formatNull

        void formatNull​(java.lang.StringBuilder buf)
      • format

        void format​(double d,
                    java.lang.StringBuilder buf)
      • format

        void format​(long n,
                    java.lang.StringBuilder buf)
      • format

        void format​(java.lang.String s,
                    java.lang.StringBuilder buf)
      • format

        void format​(java.util.Date date,
                    java.lang.StringBuilder buf)
      • format

        void format​(java.util.Calendar calendar,
                    java.lang.StringBuilder buf)
      • isApplicableTo

        boolean isApplicableTo​(double n)
        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.

        Parameters:
        n - value
        Returns:
        Whether this format is applicable for a given value
      • isApplicableTo

        boolean isApplicableTo​(long n)
        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.

        Parameters:
        n - value
        Returns:
        Whether this format is applicable for a given value