public abstract class AbstractFormat extends NumberFormat implements Serializable
FractionFormat
and BigFractionFormat
.NumberFormat.Field
FRACTION_FIELD, INTEGER_FIELD
Modifier and Type | Method and Description |
---|---|
StringBuffer |
format(double value,
StringBuffer buffer,
FieldPosition position)
Formats a double value as a fraction and appends the result to a StringBuffer.
|
StringBuffer |
format(long value,
StringBuffer buffer,
FieldPosition position)
Formats a long value as a fraction and appends the result to a StringBuffer.
|
NumberFormat |
getDenominatorFormat()
Access the denominator format.
|
NumberFormat |
getNumeratorFormat()
Access the numerator format.
|
void |
setDenominatorFormat(NumberFormat format)
Modify the denominator format.
|
void |
setNumeratorFormat(NumberFormat format)
Modify the numerator format.
|
clone, equals, format, format, format, getAvailableLocales, getCurrency, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getIntegerInstance, getIntegerInstance, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, getRoundingMode, hashCode, isGroupingUsed, isParseIntegerOnly, parse, parse, parseObject, setCurrency, setGroupingUsed, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setParseIntegerOnly, setRoundingMode
format, formatToCharacterIterator, parseObject
public NumberFormat getDenominatorFormat()
public NumberFormat getNumeratorFormat()
public void setDenominatorFormat(NumberFormat format)
format
- the new denominator format value.NullArgumentException
- if format
is null
.public void setNumeratorFormat(NumberFormat format)
format
- the new numerator format value.NullArgumentException
- if format
is null
.public StringBuffer format(double value, StringBuffer buffer, FieldPosition position)
format
in class NumberFormat
value
- the double value to formatbuffer
- StringBuffer to append toposition
- On input: an alignment field, if desired. On output: the
offsets of the alignment fieldNumberFormat.format(Object, StringBuffer, FieldPosition)
public StringBuffer format(long value, StringBuffer buffer, FieldPosition position)
format
in class NumberFormat
value
- the long value to formatbuffer
- StringBuffer to append toposition
- On input: an alignment field, if desired. On output: the
offsets of the alignment fieldNumberFormat.format(Object, StringBuffer, FieldPosition)
Jas4pp 1.5 © Java Analysis Studio for Particle Physics