|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.text.Format
java.text.NumberFormat
org.apache.commons.math.fraction.AbstractFormat
public abstract class AbstractFormat
Common part shared by both FractionFormat and BigFractionFormat.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.text.NumberFormat |
|---|
NumberFormat.Field |
| Field Summary |
|---|
| Fields inherited from class java.text.NumberFormat |
|---|
FRACTION_FIELD, INTEGER_FIELD |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.text.Format |
|---|
format, formatToCharacterIterator, parseObject |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
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 NumberFormatvalue - the double value to formatbuffer - StringBuffer to append toposition - On input: an alignment field, if desired. On output: the
offsets of the alignment field
NumberFormat.format(Object, StringBuffer, FieldPosition)
public StringBuffer format(long value,
StringBuffer buffer,
FieldPosition position)
format in class NumberFormatvalue - the long value to formatbuffer - StringBuffer to append toposition - On input: an alignment field, if desired. On output: the
offsets of the alignment field
NumberFormat.format(Object, StringBuffer, FieldPosition)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||