public class ChoiceDecimalFormat
extends java.text.NumberFormat
| Constructor and Description |
|---|
ChoiceDecimalFormat(double[] limits,
java.text.DecimalFormat[] formats)
for each double in limits, if a number is passed into format that is less
than it the corresponding format from formats is used.
|
| Modifier and Type | Method and Description |
|---|---|
static ChoiceDecimalFormat |
createTomStyleA()
This creates a ChoiceDecimalFormat where numbers < 100 have a single decimal, and numbers >=100
have none
|
static ChoiceDecimalFormat |
createTomStyleB()
This creates a ChoiceDecimalFormat where numbers < 10 have a single decimal, and numbers >=10
have none
|
java.lang.StringBuffer |
format(double number,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos) |
java.lang.StringBuffer |
format(long number,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos) |
java.lang.Number |
parse(java.lang.String source,
java.text.ParsePosition parsePosition) |
clone, equals, format, format, format, getAvailableLocales, getCurrency, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getIntegerInstance, getIntegerInstance, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, getRoundingMode, hashCode, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setCurrency, setGroupingUsed, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setParseIntegerOnly, setRoundingModepublic ChoiceDecimalFormat(double[] limits,
java.text.DecimalFormat[] formats)
public java.lang.Number parse(java.lang.String source,
java.text.ParsePosition parsePosition)
parse in class java.text.NumberFormatpublic java.lang.StringBuffer format(double number,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
format in class java.text.NumberFormatpublic java.lang.StringBuffer format(long number,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
format in class java.text.NumberFormatpublic static ChoiceDecimalFormat createTomStyleA()
public static ChoiceDecimalFormat createTomStyleB()