public class DecimalFormat extends NumberFormat
Format.Field
FRACTION_FIELD, INTEGER_FIELD
Constructor and Description |
---|
DecimalFormat() |
DecimalFormat(String pattern) |
DecimalFormat(String pattern,
DecimalFormatSymbols dfs) |
Modifier and Type | Method and Description |
---|---|
void |
applyLocalizedPattern(String pattern) |
void |
applyPattern(String pattern) |
Object |
clone()
Returns a copy of this
Format instance. |
boolean |
equals(Object o)
Default object equality (is identity).
|
StringBuffer |
format(double number,
StringBuffer dest,
FieldPosition pos) |
StringBuffer |
format(long number,
StringBuffer dest,
FieldPosition pos) |
DecimalFormatSymbols |
getDecimalFormatSymbols() |
int |
getGroupingSize() |
int |
getMultiplier() |
String |
getNegativePrefix() |
String |
getNegativeSuffix() |
String |
getPositivePrefix() |
String |
getPositiveSuffix() |
int |
hashCode()
The (default) object hashcode: for transient objects this is simply the
address of the instance in memory, for persistent objects it is the
address at which the instance was first created (maybe in a previous
activation of the VM).
|
boolean |
isDecimalSeparatorAlwaysShown() |
Number |
parse(String str,
ParsePosition pos) |
void |
setDecimalFormatSymbols(DecimalFormatSymbols syms) |
void |
setDecimalSeparatorAlwaysShown(boolean val) |
void |
setGroupingSize(int size) |
void |
setMaximumFractionDigits(int max) |
void |
setMaximumIntegerDigits(int max) |
void |
setMinimumFractionDigits(int min) |
void |
setMinimumIntegerDigits(int min) |
void |
setMultiplier(int mul) |
void |
setNegativePrefix(String prefix) |
void |
setNegativeSuffix(String suffix) |
void |
setPositivePrefix(String prefix) |
void |
setPositiveSuffix(String suffix) |
String |
toLocalizedPattern() |
String |
toPattern() |
format, format, format, getAvailableLocales, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setGroupingUsed, setParseIntegerOnly
format, formatToCharacterIterator, parseObject
public DecimalFormat()
public DecimalFormat(String pattern)
public DecimalFormat(String pattern, DecimalFormatSymbols dfs)
public void applyLocalizedPattern(String pattern)
public void applyPattern(String pattern)
public Object clone()
Format
Format
instance.clone
in class NumberFormat
Cloneable
public boolean equals(Object o)
Object
equals
in class NumberFormat
public StringBuffer format(double number, StringBuffer dest, FieldPosition pos)
format
in class NumberFormat
public StringBuffer format(long number, StringBuffer dest, FieldPosition pos)
format
in class NumberFormat
public DecimalFormatSymbols getDecimalFormatSymbols()
public int getGroupingSize()
public int getMultiplier()
public String getNegativePrefix()
public String getNegativeSuffix()
public String getPositivePrefix()
public String getPositiveSuffix()
public int hashCode()
Object
hashCode
in class NumberFormat
public boolean isDecimalSeparatorAlwaysShown()
public Number parse(String str, ParsePosition pos)
parse
in class NumberFormat
public void setDecimalFormatSymbols(DecimalFormatSymbols syms)
public void setDecimalSeparatorAlwaysShown(boolean val)
public void setGroupingSize(int size)
public void setMaximumFractionDigits(int max)
setMaximumFractionDigits
in class NumberFormat
public void setMaximumIntegerDigits(int max)
setMaximumIntegerDigits
in class NumberFormat
public void setMinimumFractionDigits(int min)
setMinimumFractionDigits
in class NumberFormat
public void setMinimumIntegerDigits(int min)
setMinimumIntegerDigits
in class NumberFormat
public void setMultiplier(int mul)
public void setNegativePrefix(String prefix)
public void setNegativeSuffix(String suffix)
public void setPositivePrefix(String prefix)
public void setPositiveSuffix(String suffix)
public String toLocalizedPattern()
public String toPattern()