The number format for each of the whole number, numerator and, denominator can be configured.
| Modifier and Type | Field and Description |
|---|---|
| private static final long | serialVersionUID
Hides org. |
| Access | Constructor and Description |
|---|---|
| public | BigFractionFormat()
Create an improper formatting instance with the default number format for the numerator and denominator. |
| public | BigFractionFormat(final NumberFormat
the custom format for both the numerator and denominator. format)Create an improper formatting instance with a custom number format for both the numerator and denominator. |
| public | BigFractionFormat(final NumberFormat
the custom format for the numerator. numeratorFormat, final NumberFormat the custom format for the denominator. denominatorFormat)Create an improper formatting instance with a custom number format for the numerator and a custom number format for the denominator. |
| Modifier and Type | Method and Description |
|---|---|
| public StringBuffer | Returns: the value passed in as toAppendTo.the object to format. BigFraction, final StringBuffer where the text is to be appended toAppendTo, final FieldPosition On input: an alignment field, if desired. On output: the
offsets of the alignment field pos)Formats a |
| public StringBuffer | Returns: the value passed in as toAppendTo.the object to format. obj, final StringBuffer where the text is to be appended toAppendTo, final FieldPosition On input: an alignment field, if desired. On output: the
offsets of the alignment field pos)Overrides java. Formats an object and appends the result to a StringBuffer. |
| public static String | Returns: A formatted BigFraction in proper form.BigFraction object to format f)This static method calls formatBigFraction() on a default instance of BigFractionFormat. |
| public static Locale[] | Returns: available complex format locales.Hides java. Get the set of locales for which complex formats are available. |
| public static BigFractionFormat | Returns: the default complex format.Returns the default complex format for the current locale. |
| public static BigFractionFormat | Returns: the complex format specific to the given locale.the specific locale used by the format. locale)Returns the default complex format for the given locale. |
| public static BigFractionFormat | Returns: the default complex format.Returns the default complex format for the current locale. |
| public static BigFractionFormat | Returns: the complex format specific to the given locale.the specific locale used by the format. locale)Returns the default complex format for the given locale. |
| public BigFraction | Returns: the parsedBigFraction object.the string to parse source)Overrides java. Parses a string to produce a |
| public BigFraction | Returns: the parsedBigFraction object.the string to parse source, final ParsePosition input/output parsing parameter. pos)Implements abstract java. Parses a string to produce a |
| protected BigInteger | Returns: a parsedBigInteger or null if string does not
contain a BigInteger at the specified positionthe string to parse source, final ParsePosition input/output parsing parameter. pos)Parses a string to produce a |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. Serializable version identifier | |
| BigFractionFormat | back to summary |
|---|---|
| public BigFractionFormat() Create an improper formatting instance with the default number format for the numerator and denominator. | |
| BigFractionFormat | back to summary |
|---|---|
| public BigFractionFormat(final NumberFormat format) Create an improper formatting instance with a custom number format for both the numerator and denominator.
| |
| BigFractionFormat | back to summary |
|---|---|
| public BigFractionFormat(final NumberFormat numeratorFormat, final NumberFormat denominatorFormat) Create an improper formatting instance with a custom number format for the numerator and a custom number format for the denominator.
| |
| format | back to summary |
|---|---|
| public StringBuffer format(final BigFraction BigFraction, final StringBuffer toAppendTo, final FieldPosition pos) Formats a
| |
| format | back to summary |
|---|---|
| public StringBuffer format(final Object obj, final StringBuffer toAppendTo, final FieldPosition pos) Overrides java. Formats an object and appends the result to a StringBuffer.
| |
| formatBigFraction | back to summary |
|---|---|
| public static String formatBigFraction(final BigFraction f) This static method calls formatBigFraction() on a default instance of BigFractionFormat.
| |
| getAvailableLocales | back to summary |
|---|---|
| public static Locale[] getAvailableLocales() Hides java. Get the set of locales for which complex formats are available. This
is the same set as the
| |
| getImproperInstance | back to summary |
|---|---|
| public static BigFractionFormat getImproperInstance() Returns the default complex format for the current locale.
| |
| getImproperInstance | back to summary |
|---|---|
| public static BigFractionFormat getImproperInstance(final Locale locale) Returns the default complex format for the given locale.
| |
| getProperInstance | back to summary |
|---|---|
| public static BigFractionFormat getProperInstance() Returns the default complex format for the current locale.
| |
| getProperInstance | back to summary |
|---|---|
| public static BigFractionFormat getProperInstance(final Locale locale) Returns the default complex format for the given locale.
| |
| parse | back to summary |
|---|---|
| public BigFraction parse(final String source) throws MathParseException Overrides java. Parses a string to produce a
| |
| parse | back to summary |
|---|---|
| public BigFraction parse(final String source, final ParsePosition pos) Implements abstract java. Parses a string to produce a
| |
| parseNextBigInteger | back to summary |
|---|---|
| protected BigInteger parseNextBigInteger(final String source, final ParsePosition pos) Parses a string to produce a
| |