public class DecimalFormat extends NumberFormat implements Cloneable
| Constructor and Description |
|---|
DecimalFormat() |
DecimalFormat(String pattern) |
DecimalFormat(String pattern,
DecimalFormatSymbols symbols) |
| Modifier and Type | Method and Description |
|---|---|
String |
format(double number) |
String |
format(long number) |
StringBuffer |
format(Object obj,
StringBuffer toAppendTo,
FieldPosition pos) |
DecimalFormatSymbols |
getDecimalFormatSymbols() |
String |
getNegativePrefix() |
String |
getNegativeSuffix() |
String |
getPositivePrefix() |
String |
getPositiveSuffix() |
boolean |
isGroupingUsed() |
boolean |
isParseIntegerOnly() |
Number |
parse(String source,
ParsePosition pos) |
void |
setGroupingUsed(boolean newValue) |
void |
setMaximumFractionDigits(int newValue) |
void |
setMaximumIntegerDigits(int newValue) |
void |
setMinimumFractionDigits(int newValue) |
void |
setMinimumIntegerDigits(int newValue) |
void |
setParseIntegerOnly(boolean value) |
getInstance, getIntegerInstance, getNumberInstance, parseObjectformat, parseObjectpublic DecimalFormat()
public DecimalFormat(String pattern)
public DecimalFormat(String pattern, DecimalFormatSymbols symbols)
public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos)
public Number parse(String source, ParsePosition pos)
parse in class NumberFormatpublic void setMaximumFractionDigits(int newValue)
setMaximumFractionDigits in class NumberFormatpublic void setMaximumIntegerDigits(int newValue)
setMaximumIntegerDigits in class NumberFormatpublic void setMinimumFractionDigits(int newValue)
setMinimumFractionDigits in class NumberFormatpublic void setMinimumIntegerDigits(int newValue)
setMinimumIntegerDigits in class NumberFormatpublic String format(long number)
format in class NumberFormatpublic String format(double number)
format in class NumberFormatpublic DecimalFormatSymbols getDecimalFormatSymbols()
public String getPositivePrefix()
public String getNegativePrefix()
public String getPositiveSuffix()
public String getNegativeSuffix()
public boolean isGroupingUsed()
isGroupingUsed in class NumberFormatpublic void setGroupingUsed(boolean newValue)
setGroupingUsed in class NumberFormatpublic boolean isParseIntegerOnly()
isParseIntegerOnly in class NumberFormatpublic void setParseIntegerOnly(boolean value)
setParseIntegerOnly in class NumberFormat