| Modifier and Type | Field and Description |
|---|---|
| private static final long | serialVersionUID
Hides org. |
| Access | Constructor and Description |
|---|---|
| public | FractionFormat()
Create an improper formatting instance with the default number format for the numerator and denominator. |
| public | FractionFormat(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 | FractionFormat(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. fraction, 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 fraction in proper form.Fraction object to format f)This static method calls formatFraction() on a default instance of FractionFormat. |
| public static Locale[] | Returns: available complex format locales.Hides java. Get the set of locales for which complex formats are available. |
| protected static NumberFormat | Returns: the default number format.Hides org. Create a default number format. |
| public static FractionFormat | Returns: the default complex format.Returns the default complex format for the current locale. |
| public static FractionFormat | 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 FractionFormat | Returns: the default complex format.Returns the default complex format for the current locale. |
| public static FractionFormat | 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 Fraction | Returns: the parsedFraction object.the string to parse source)Overrides java. Parses a string to produce a |
| public Fraction | Returns: the parsedFraction object.the string to parse source, final ParsePosition input/output parsing parameter. pos)Implements abstract java. Parses a string to produce a |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. Serializable version identifier | |
| FractionFormat | back to summary |
|---|---|
| public FractionFormat() Create an improper formatting instance with the default number format for the numerator and denominator. | |
| FractionFormat | back to summary |
|---|---|
| public FractionFormat(final NumberFormat format) Create an improper formatting instance with a custom number format for both the numerator and denominator.
| |
| FractionFormat | back to summary |
|---|---|
| public FractionFormat(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 Fraction fraction, final StringBuffer toAppendTo, final FieldPosition pos) Formats a
| |
| format | back to summary |
|---|---|
| public StringBuffer format(final Object obj, final StringBuffer toAppendTo, final FieldPosition pos) throws FractionConversionException, MathIllegalArgumentException Overrides java. Formats an object and appends the result to a StringBuffer.
| |
| formatFraction | back to summary |
|---|---|
| public static String formatFraction(Fraction f) This static method calls formatFraction() on a default instance of FractionFormat. | |
| 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
| |
| getDefaultNumberFormat | back to summary |
|---|---|
| protected static NumberFormat getDefaultNumberFormat() Hides org. Create a default number format. The default number format is based on
| |
| getImproperInstance | back to summary |
|---|---|
| public static FractionFormat getImproperInstance() Returns the default complex format for the current locale.
| |
| getImproperInstance | back to summary |
|---|---|
| public static FractionFormat getImproperInstance(final Locale locale) Returns the default complex format for the given locale.
| |
| getProperInstance | back to summary |
|---|---|
| public static FractionFormat getProperInstance() Returns the default complex format for the current locale.
| |
| getProperInstance | back to summary |
|---|---|
| public static FractionFormat getProperInstance(final Locale locale) Returns the default complex format for the given locale.
| |
| parse | back to summary |
|---|---|
| public Fraction parse(final String source) throws MathParseException Overrides java. Parses a string to produce a
| |
| parse | back to summary |
|---|---|
| public Fraction parse(final String source, final ParsePosition pos) Implements abstract java. Parses a string to produce a
| |