Example usage for Java java.text DecimalFormat fields, constructors, methods, implement or subclass
The text is from its open source code.
DecimalFormat(String pattern) Creates a DecimalFormat using the given pattern and the symbols for the default java.util.Locale.Category#FORMAT FORMAT locale. | |
DecimalFormat() Creates a DecimalFormat using the default pattern and symbols for the default java.util.Locale.Category#FORMAT FORMAT locale. | |
DecimalFormat(String pattern, DecimalFormatSymbols symbols) Creates a DecimalFormat using the given pattern and symbols. |
void | applyLocalizedPattern(String pattern) Apply the given pattern to this Format object. |
void | applyPattern(String pattern) Apply the given pattern to this Format object. |
Object | clone() Standard override; no change in semantics. |
boolean | equals(Object obj) Overrides equals |
String | format(double number) Specialization of format. |
Currency | getCurrency() Gets the currency used by this decimal format when formatting currency values. |
NumberFormat | getCurrencyInstance(Locale inLocale) Returns a currency format for the specified locale. |
DecimalFormatSymbols | getDecimalFormatSymbols() Returns a copy of the decimal format symbols, which is generally not changed by the programmer or user. |
int | getGroupingSize() Return the grouping size. |
NumberFormat | getInstance() Returns a general-purpose number format for the current default java.util.Locale.Category#FORMAT FORMAT locale. |
int | getMaximumFractionDigits() Gets the maximum number of digits allowed in the fraction portion of a number. |
int | getMaximumIntegerDigits() Gets the maximum number of digits allowed in the integer portion of a number. |
int | getMinimumFractionDigits() Gets the minimum number of digits allowed in the fraction portion of a number. |
int | getMinimumIntegerDigits() Gets the minimum number of digits allowed in the integer portion of a number. |
int | getMultiplier() Gets the multiplier for use in percent, per mille, and similar formats. |
String | getNegativePrefix() Get the negative prefix. |
String | getNegativeSuffix() Get the negative suffix. |
String | getPositivePrefix() Get the positive prefix. |
String | getPositiveSuffix() Get the positive suffix. |
RoundingMode | getRoundingMode() Gets the java.math.RoundingMode used in this DecimalFormat. |
int | hashCode() Overrides hashCode |
boolean | isDecimalSeparatorAlwaysShown() Allows you to get the behavior of the decimal separator with integers. |
boolean | isParseBigDecimal() Returns whether the #parse(java.lang.String,java.text.ParsePosition) method returns BigDecimal . |
Number | parse(String source) Parses text from the beginning of the given string to produce a number. |
Number | parse(String text, ParsePosition pos) Parses text from a string to produce a Number . |
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 | setDecimalFormatSymbols(DecimalFormatSymbols newSymbols) Sets the decimal format symbols, which is generally not changed by the programmer or user. |
void | setDecimalSeparatorAlwaysShown(boolean newValue) Allows you to set the behavior of the decimal separator with integers. |
void | setGroupingSize(int newValue) Set the grouping size. |
void | setGroupingUsed(boolean newValue) |
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 | setMultiplier(int newValue) Sets the multiplier for use in percent, per mille, and similar formats. |
void | setNegativePrefix(String newValue) Set the negative prefix. |
void | setNegativeSuffix(String newValue) Set the negative suffix. |
void | setParseBigDecimal(boolean newValue) Sets whether the #parse(java.lang.String,java.text.ParsePosition) method returns BigDecimal . |
void | setParseIntegerOnly(boolean value) Sets whether or not numbers should be parsed as integers only. |
void | setPositivePrefix(String newValue) Set the positive prefix. |
void | setPositiveSuffix(String newValue) Set the positive suffix. |
void | setRoundingMode(RoundingMode roundingMode) Sets the java.math.RoundingMode used in this DecimalFormat. |
String | toLocalizedPattern() Synthesizes a localized pattern string that represents the current state of this Format object. |
String | toPattern() Synthesizes a pattern string that represents the current state of this Format object. |