public abstract class AbstractFormat
extends java.text.NumberFormat
implements java.io.Serializable
FractionFormat
and BigFractionFormat
.Modifier and Type | Method and Description |
---|---|
java.lang.StringBuffer |
format(double value,
java.lang.StringBuffer buffer,
java.text.FieldPosition position)
Formats a double value as a fraction and appends the result to a StringBuffer.
|
java.lang.StringBuffer |
format(long value,
java.lang.StringBuffer buffer,
java.text.FieldPosition position)
Formats a long value as a fraction and appends the result to a StringBuffer.
|
java.text.NumberFormat |
getDenominatorFormat()
Access the denominator format.
|
java.text.NumberFormat |
getNumeratorFormat()
Access the numerator format.
|
void |
setDenominatorFormat(java.text.NumberFormat format)
Modify the denominator format.
|
void |
setNumeratorFormat(java.text.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
public java.text.NumberFormat getDenominatorFormat()
public java.text.NumberFormat getNumeratorFormat()
public void setDenominatorFormat(java.text.NumberFormat format)
format
- the new denominator format value.NullArgumentException
- if format
is null
.public void setNumeratorFormat(java.text.NumberFormat format)
format
- the new numerator format value.NullArgumentException
- if format
is null
.public java.lang.StringBuffer format(double value, java.lang.StringBuffer buffer, java.text.FieldPosition position)
format
in class java.text.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 java.lang.StringBuffer format(long value, java.lang.StringBuffer buffer, java.text.FieldPosition position)
format
in class java.text.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)
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"