Example usage for Java java.text NumberFormat fields, constructors, methods, implement or subclass
The text is from its open source code.
int | INTEGER_FIELD Field constant used to construct a FieldPosition object. |
int | FRACTION_FIELD Field constant used to construct a FieldPosition object. |
NumberFormat() Sole constructor. |
Object | clone() Overrides Cloneable. |
boolean | equals(Object obj) Overrides equals. |
String | format(double number) Specialization of format. |
String | format(long number) Specialization of format. |
StringBuffer | format(Object number, StringBuffer toAppendTo, FieldPosition pos) Formats a number and appends the resulting text to the given string buffer. |
StringBuffer | format(double number, StringBuffer toAppendTo, FieldPosition pos) Specialization of format. |
StringBuffer | format(long number, StringBuffer toAppendTo, FieldPosition pos) Specialization of format. |
AttributedCharacterIterator | formatToCharacterIterator(Object obj) Formats an Object producing an AttributedCharacterIterator . |
Locale[] | getAvailableLocales() Returns an array of all locales for which the get*Instance methods of this class can return localized instances. |
Currency | getCurrency() Gets the currency used by this number format when formatting currency values. |
NumberFormat | getCurrencyInstance() Returns a currency format for the current default java.util.Locale.Category#FORMAT FORMAT locale. |
NumberFormat | getCurrencyInstance(Locale inLocale) Returns a currency format for the specified locale. |
NumberFormat | getInstance() Returns a general-purpose number format for the current default java.util.Locale.Category#FORMAT FORMAT locale. |
NumberFormat | getInstance(Locale inLocale) Returns a general-purpose number format for the specified locale. |
NumberFormat | getIntegerInstance() Returns an integer number format for the current default java.util.Locale.Category#FORMAT FORMAT locale. |
NumberFormat | getIntegerInstance(Locale inLocale) Returns an integer number format for the specified locale. |
int | getMaximumFractionDigits() Returns the maximum number of digits allowed in the fraction portion of a number. |
int | getMaximumIntegerDigits() Returns the maximum number of digits allowed in the integer portion of a number. |
int | getMinimumFractionDigits() Returns the minimum number of digits allowed in the fraction portion of a number. |
int | getMinimumIntegerDigits() Returns the minimum number of digits allowed in the integer portion of a number. |
NumberFormat | getNumberInstance() Returns a general-purpose number format for the current default java.util.Locale.Category#FORMAT FORMAT locale. |
NumberFormat | getNumberInstance(Locale inLocale) Returns a general-purpose number format for the specified locale. |
NumberFormat | getPercentInstance() Returns a percentage format for the current default java.util.Locale.Category#FORMAT FORMAT locale. |
NumberFormat | getPercentInstance(Locale inLocale) Returns a percentage format for the specified locale. |
RoundingMode | getRoundingMode() Gets the java.math.RoundingMode used in this NumberFormat. |
int | hashCode() Overrides hashCode. |
boolean | isGroupingUsed() Returns true if grouping is used in this format. |
boolean | isParseIntegerOnly() Returns true if this format will parse numbers as integers only. |
Number | parse(String source) Parses text from the beginning of the given string to produce a number. |
Number | parse(String source, ParsePosition parsePosition) Returns a Long if possible (e.g., within the range [Long.MIN_VALUE, Long.MAX_VALUE] and with no decimals), otherwise a Double. |
Object | parseObject(String source, ParsePosition pos) Parses text from a string to produce a Number . |
Object | parseObject(String source) Parses text from the beginning of the given string to produce an object. |
void | setCurrency(Currency currency) Sets the currency used by this number format when formatting currency values. |
void | setGroupingUsed(boolean newValue) Set whether or not grouping will be used in this format. |
void | setMaximumFractionDigits(int newValue) Sets the maximum number of digits allowed in the fraction portion of a number. |
void | setMaximumIntegerDigits(int newValue) Sets the maximum number of digits allowed in the integer portion of a number. |
void | setMinimumFractionDigits(int newValue) Sets the minimum number of digits allowed in the fraction portion of a number. |
void | setMinimumIntegerDigits(int newValue) Sets the minimum number of digits allowed in the integer portion of a number. |
void | setParseIntegerOnly(boolean value) Sets whether or not numbers should be parsed as integers only. |
void | setRoundingMode(RoundingMode roundingMode) Sets the java.math.RoundingMode used in this NumberFormat. |