public class CustomDecimalFormat extends DecimalFormat
NumberFormat.Field| Modifier and Type | Field and Description |
|---|---|
static int |
REP_ALL_NINES |
static int |
REP_ALL_ZEROS |
static int |
REP_TRUNCATE |
FRACTION_FIELD, INTEGER_FIELD| Constructor and Description |
|---|
CustomDecimalFormat(int numberDigits)
Creates a custom decimal format with the supplied number of digits.
|
CustomDecimalFormat(int numberDigits,
int overflowType)
Creates a custom decimal format with the supplied number of digits.
|
| Modifier and Type | Method and Description |
|---|---|
StringBuffer |
format(double number,
StringBuffer toAppendTo,
FieldPosition pos) |
StringBuffer |
format(long number,
StringBuffer toAppendTo,
FieldPosition pos) |
applyLocalizedPattern, applyPattern, clone, equals, format, formatToCharacterIterator, getCurrency, getDecimalFormatSymbols, getGroupingSize, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getMultiplier, getNegativePrefix, getNegativeSuffix, getPositivePrefix, getPositiveSuffix, getRoundingMode, hashCode, isDecimalSeparatorAlwaysShown, isParseBigDecimal, parse, setCurrency, setDecimalFormatSymbols, setDecimalSeparatorAlwaysShown, setGroupingSize, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setMultiplier, setNegativePrefix, setNegativeSuffix, setParseBigDecimal, setPositivePrefix, setPositiveSuffix, setRoundingMode, toLocalizedPattern, toPatternformat, format, getAvailableLocales, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getIntegerInstance, getIntegerInstance, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setGroupingUsed, setParseIntegerOnlyformat, parseObjectpublic static final int REP_ALL_ZEROS
public static final int REP_ALL_NINES
public static final int REP_TRUNCATE
public CustomDecimalFormat(int numberDigits)
numberDigits - public CustomDecimalFormat(int numberDigits,
int overflowType)
numberDigits - overflowType - public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos)
format in class DecimalFormatpublic StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos)
format in class DecimalFormatCopyright © 2014 FreeLibrary. All Rights Reserved.