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, parseObject
format, parseObject
public 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 NumberFormat
public void setMaximumFractionDigits(int newValue)
setMaximumFractionDigits
in class NumberFormat
public void setMaximumIntegerDigits(int newValue)
setMaximumIntegerDigits
in class NumberFormat
public void setMinimumFractionDigits(int newValue)
setMinimumFractionDigits
in class NumberFormat
public void setMinimumIntegerDigits(int newValue)
setMinimumIntegerDigits
in class NumberFormat
public String format(long number)
format
in class NumberFormat
public String format(double number)
format
in class NumberFormat
public DecimalFormatSymbols getDecimalFormatSymbols()
public String getPositivePrefix()
public String getNegativePrefix()
public String getPositiveSuffix()
public String getNegativeSuffix()
public boolean isGroupingUsed()
isGroupingUsed
in class NumberFormat
public void setGroupingUsed(boolean newValue)
setGroupingUsed
in class NumberFormat
public boolean isParseIntegerOnly()
isParseIntegerOnly
in class NumberFormat
public void setParseIntegerOnly(boolean value)
setParseIntegerOnly
in class NumberFormat