Method Summary |
|
public Object | clone() Answers a new NumberFormat with the same properties as this NumberFormat. |
public boolean | equals(Object object) Compares the specified object to this NumberFormat and answer if they are
equal. |
final public String | format(double value) Formats the specified double using the rules of this NumberFormat. |
abstract public StringBuffer | format(double value, StringBuffer buffer, FieldPosition field) Formats the double value into the specified StringBuffer using the rules
of this NumberFormat. |
final public String | format(long value) Formats the specified long using the rules of this NumberFormat. |
abstract public StringBuffer | format(long value, StringBuffer buffer, FieldPosition field) Formats the long value into the specified StringBuffer using the rules of
this NumberFormat. |
public StringBuffer | format(Object object, StringBuffer buffer, FieldPosition field) Formats the specified object into the specified StringBuffer using the
rules of this DateFormat. |
public static Locale[] | getAvailableLocales() Gets the list of installed Locales which support NumberFormat. |
public Currency | getCurrency() Answers the currency used by this number format
This implementation throws UnsupportedOperationException, concrete sub
classes should override if they support currency formatting. |
final public static NumberFormat | getCurrencyInstance() Answers a NumberFormat for formatting and parsing currency for the
default Locale. |
public static NumberFormat | getCurrencyInstance(Locale locale) Answers a NumberFormat for formatting and parsing currency for the
specified Locale. |
final public static NumberFormat | getInstance() Answers a NumberFormat for formatting and parsing numbers for the default
Locale. |
public static NumberFormat | getInstance(Locale locale) Answers a NumberFormat for formatting and parsing numbers for the
specified Locale. |
final public static NumberFormat | getIntegerInstance() Answers a NumberFormat for formatting and parsing integers for the
default Locale. |
public static NumberFormat | getIntegerInstance(Locale locale) Answers a NumberFormat for formatting and parsing integers for the
specified Locale. |
public int | getMaximumFractionDigits() Answers the maximum number of fraction digits that are printed when
formatting. |
public int | getMaximumIntegerDigits() Answers the maximum number of integer digits that are printed when
formatting. |
public int | getMinimumFractionDigits() Answers the minimum number of fraction digits that are printed when
formatting. |
public int | getMinimumIntegerDigits() Answers the minimum number of integer digits that are printed when
formatting. |
final public static NumberFormat | getNumberInstance() Answers a NumberFormat for formatting and parsing numbers for the default
Locale. |
public static NumberFormat | getNumberInstance(Locale locale) Answers a NumberFormat for formatting and parsing numbers for the
specified Locale. |
final public static NumberFormat | getPercentInstance() Answers a NumberFormat for formatting and parsing percentages for the
default Locale. |
public static NumberFormat | getPercentInstance(Locale locale) Answers a NumberFormat for formatting and parsing percentages for the
specified Locale. |
public int | hashCode() Answers an integer hash code for the receiver. |
public boolean | isGroupingUsed() Answers whether this NumberFormat formats and parses numbers using a
grouping separator. |
public boolean | isParseIntegerOnly() Answers whether this NumberFormat only parses integer numbers. |
public Number | parse(String string) Parse a Number from the specified String using the rules of this
NumberFormat. |
abstract public Number | parse(String string, ParsePosition position) Parse a Number from the specified String starting at the index specified
by the ParsePosition. |
final public Object | parseObject(String string, ParsePosition position) Parse a Number from the specified String starting at the index specified
by the ParsePosition. |
public void | setCurrency(Currency currency) Sets the currency used by this number format when formatting currency
values. |
public void | setGroupingUsed(boolean value) Sets whether this NumberFormat formats and parses numbers using a
grouping separator. |
public void | setMaximumFractionDigits(int value) Sets the maximum number of fraction digits that are printed when
formatting. |
public void | setMaximumIntegerDigits(int value) Used to specify the new maximum count of integer digits that are printed
when formatting. |
public void | setMinimumFractionDigits(int value) Sets the minimum number of fraction digits that are printed when
formatting. |
public void | setMinimumIntegerDigits(int value) Sets the minimum number of integer digits that are printed when
formatting. |
public void | setParseIntegerOnly(boolean value) Specifies if this NumberFormat should only parse numbers as integers or
else as any kind of number. |