Package mondrian.util
Class Format.CompoundFormat
- java.lang.Object
-
- mondrian.util.Format.BasicFormat
-
- mondrian.util.Format.CompoundFormat
-
- Enclosing class:
- Format
static class Format.CompoundFormat extends Format.BasicFormat
CompoundFormat is an implementation ofFormat.BasicFormatwhere each value is formatted by applying a sequence of format elements. Each format element is itself a format.- See Also:
Format.AlternateFormat
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Format.BasicFormat[]formats-
Fields inherited from class mondrian.util.Format.BasicFormat
code
-
-
Constructor Summary
Constructors Constructor Description CompoundFormat(Format.BasicFormat[] formats)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidformat(double v, StringBuilder buf)(package private) voidformat(long v, StringBuilder buf)(package private) voidformat(String v, StringBuilder buf)(package private) voidformat(Calendar v, StringBuilder buf)(package private) voidformat(Date v, StringBuilder buf)(package private) booleanisApplicableTo(double n)Returns whether this format can handle a given value.-
Methods inherited from class mondrian.util.Format.BasicFormat
formatNull, getFormatType, isApplicableTo
-
-
-
-
Field Detail
-
formats
final Format.BasicFormat[] formats
-
-
Constructor Detail
-
CompoundFormat
CompoundFormat(Format.BasicFormat[] formats)
-
-
Method Detail
-
format
void format(double v, StringBuilder buf)- Overrides:
formatin classFormat.BasicFormat
-
format
void format(long v, StringBuilder buf)- Overrides:
formatin classFormat.BasicFormat
-
format
void format(String v, StringBuilder buf)
- Overrides:
formatin classFormat.BasicFormat
-
format
void format(Date v, StringBuilder buf)
- Overrides:
formatin classFormat.BasicFormat
-
format
void format(Calendar v, StringBuilder buf)
- Overrides:
formatin classFormat.BasicFormat
-
isApplicableTo
boolean isApplicableTo(double n)
Description copied from class:Format.BasicFormatReturns 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:
isApplicableToin classFormat.BasicFormat- Parameters:
n- value- Returns:
- Whether this format is applicable for a given value
-
-