public final class DateNumberFormat extends NumberFormat
NumberFormat.Field, NumberFormat.NumberFormatFactory, NumberFormat.SimpleNumberFormatFactoryACCOUNTINGCURRENCYSTYLE, CASHCURRENCYSTYLE, CURRENCYSTYLE, FRACTION_FIELD, INTEGER_FIELD, INTEGERSTYLE, ISOCURRENCYSTYLE, NUMBERSTYLE, PERCENTSTYLE, PLURALCURRENCYSTYLE, SCIENTIFICSTYLE, STANDARDCURRENCYSTYLE| Constructor and Description |
|---|
DateNumberFormat(ULocale loc,
char zeroDigit,
String nsName) |
DateNumberFormat(ULocale loc,
String digitString,
String nsName) |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Overrides clone.
|
boolean |
equals(Object obj)
Overrides equals.
|
StringBuffer |
format(BigDecimal number,
StringBuffer toAppendTo,
FieldPosition pos)
Formats a BigDecimal.
|
StringBuffer |
format(BigDecimal number,
StringBuffer toAppendTo,
FieldPosition pos)
Formats an ICU BigDecimal.
|
StringBuffer |
format(BigInteger number,
StringBuffer toAppendTo,
FieldPosition pos)
Formats a BigInteger.
|
StringBuffer |
format(double number,
StringBuffer toAppendTo,
FieldPosition pos)
Specialization of format.
|
StringBuffer |
format(long numberL,
StringBuffer toAppendTo,
FieldPosition pos)
Specialization of format.
|
char[] |
getDigits() |
int |
getMaximumIntegerDigits()
Returns the maximum number of digits allowed in the integer portion of a
number.
|
int |
getMinimumIntegerDigits()
Returns the minimum number of digits allowed in the integer portion of a
number.
|
char |
getZeroDigit() |
int |
hashCode()
Overrides hashCode.
|
Number |
parse(String text,
ParsePosition parsePosition)
Returns a Long if possible (e.g., within the range [Long.MIN_VALUE,
Long.MAX_VALUE] and with no decimals), otherwise a Double.
|
void |
setMaximumIntegerDigits(int newValue)
Sets the maximum number of digits allowed in the integer portion of a
number.
|
void |
setMinimumIntegerDigits(int newValue)
Sets the minimum number of digits allowed in the integer portion of a
number.
|
void |
setParsePositiveOnly(boolean isPositiveOnly) |
void |
setZeroDigit(char zero) |
format, format, format, format, format, format, format, format, getAvailableLocales, getAvailableULocales, getContext, getCurrency, getCurrencyInstance, getCurrencyInstance, getCurrencyInstance, getEffectiveCurrency, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getIntegerInstance, getIntegerInstance, getIntegerInstance, getMaximumFractionDigits, getMinimumFractionDigits, getNumberInstance, getNumberInstance, getNumberInstance, getPattern, getPattern, getPercentInstance, getPercentInstance, getPercentInstance, getRoundingMode, getScientificInstance, getScientificInstance, getScientificInstance, isGroupingUsed, isParseIntegerOnly, isParseStrict, parse, parseCurrency, parseObject, registerFactory, setContext, setCurrency, setGroupingUsed, setMaximumFractionDigits, setMinimumFractionDigits, setParseIntegerOnly, setParseStrict, setRoundingMode, unregisterformat, formatToCharacterIterator, parseObjectpublic void setMaximumIntegerDigits(int newValue)
NumberFormatsetMaximumIntegerDigits in class NumberFormatnewValue - the maximum number of integer digits to be shown; if
less than zero, then zero is used. Subclasses might enforce an
upper limit to this value appropriate to the numeric type being formatted.NumberFormat.getMaximumIntegerDigits()public int getMaximumIntegerDigits()
NumberFormatgetMaximumIntegerDigits in class NumberFormatNumberFormat.setMaximumIntegerDigits(int)public void setMinimumIntegerDigits(int newValue)
NumberFormatsetMinimumIntegerDigits in class NumberFormatnewValue - the minimum number of integer digits to be shown; if
less than zero, then zero is used. Subclasses might enforce an
upper limit to this value appropriate to the numeric type being formatted.NumberFormat.getMinimumIntegerDigits()public int getMinimumIntegerDigits()
NumberFormatgetMinimumIntegerDigits in class NumberFormatNumberFormat.setMinimumIntegerDigits(int)public void setParsePositiveOnly(boolean isPositiveOnly)
public char getZeroDigit()
public void setZeroDigit(char zero)
public char[] getDigits()
public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos)
NumberFormatformat in class NumberFormatFormat.format(Object, StringBuffer, FieldPosition)public StringBuffer format(long numberL, StringBuffer toAppendTo, FieldPosition pos)
NumberFormatformat in class NumberFormatFormat.format(Object, StringBuffer, FieldPosition)public StringBuffer format(BigInteger number, StringBuffer toAppendTo, FieldPosition pos)
NumberFormatformat in class NumberFormatFormat.format(Object, StringBuffer, FieldPosition)public StringBuffer format(BigDecimal number, StringBuffer toAppendTo, FieldPosition pos)
NumberFormatformat in class NumberFormatFormat.format(Object, StringBuffer, FieldPosition)public StringBuffer format(BigDecimal number, StringBuffer toAppendTo, FieldPosition pos)
NumberFormatformat in class NumberFormatFormat.format(Object, StringBuffer, FieldPosition)public Number parse(String text, ParsePosition parsePosition)
NumberFormatparse in class NumberFormatNumberFormat.isParseIntegerOnly(),
Format.parseObject(String, ParsePosition)public boolean equals(Object obj)
NumberFormatequals in class NumberFormatobj - the object to compare againstObject.hashCode()public int hashCode()
NumberFormathashCode in class NumberFormatObject.equals(java.lang.Object)public Object clone()
NumberFormatclone in class NumberFormatCloneable