static class Format.CompoundFormat extends Format.BasicFormat
Format.BasicFormat
where
each value is formatted by applying a sequence of format elements. Each
format element is itself a format.Format.AlternateFormat
Modifier and Type | Field and Description |
---|---|
(package private) Format.BasicFormat[] |
formats |
code
Constructor and Description |
---|
CompoundFormat(Format.BasicFormat[] formats) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
format(Calendar v,
StringBuilder buf) |
(package private) void |
format(Date v,
StringBuilder buf) |
(package private) void |
format(double v,
StringBuilder buf) |
(package private) void |
format(long v,
StringBuilder buf) |
(package private) void |
format(String v,
StringBuilder buf) |
(package private) boolean |
isApplicableTo(double n)
Returns whether this format can handle a given value.
|
formatNull, getFormatType, isApplicableTo
final Format.BasicFormat[] formats
CompoundFormat(Format.BasicFormat[] formats)
void format(double v, StringBuilder buf)
format
in class Format.BasicFormat
void format(long v, StringBuilder buf)
format
in class Format.BasicFormat
void format(String v, StringBuilder buf)
format
in class Format.BasicFormat
void format(Date v, StringBuilder buf)
format
in class Format.BasicFormat
void format(Calendar v, StringBuilder buf)
format
in class Format.BasicFormat
boolean isApplicableTo(double n)
Format.BasicFormat
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.
isApplicableTo
in class Format.BasicFormat
n
- value