public class ChoiceFormat extends NumberFormat
Format.Field
FRACTION_FIELD, INTEGER_FIELD
Constructor and Description |
---|
ChoiceFormat(double[] limits,
String[] formats) |
ChoiceFormat(String newPattern) |
Modifier and Type | Method and Description |
---|---|
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 num,
StringBuffer app,
FieldPosition pos) |
StringBuffer |
format(long num,
StringBuffer app,
FieldPosition pos) |
Object[] |
getFormats() |
double[] |
getLimits() |
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).
|
static double |
nextDouble(double d) |
static double |
nextDouble(double d,
boolean next) |
Number |
parse(String srcStr,
ParsePosition pos) |
static double |
previousDouble(double d) |
void |
setChoices(double[] limits,
String[] formats) |
String |
toPattern() |
format, format, format, getAvailableLocales, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setGroupingUsed, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setParseIntegerOnly
format, formatToCharacterIterator, parseObject
public ChoiceFormat(String newPattern)
public ChoiceFormat(double[] limits, String[] formats)
public static final double nextDouble(double d)
public static double nextDouble(double d, boolean next)
public static final double previousDouble(double d)
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(long num, StringBuffer app, FieldPosition pos)
format
in class NumberFormat
public StringBuffer format(double num, StringBuffer app, FieldPosition pos)
format
in class NumberFormat
public Object[] getFormats()
public double[] getLimits()
public int hashCode()
Object
hashCode
in class NumberFormat
public Number parse(String srcStr, ParsePosition pos)
parse
in class NumberFormat
public void setChoices(double[] limits, String[] formats)
public String toPattern()