| Modifier and Type | Field and Description |
|---|---|
| private static SimpleCache | |
| private static final int | |
| private transient char[] | |
| private char[] | |
| private int | |
| private int | |
| private char | |
| private static final long | |
| private boolean | |
| private static final long | |
| private char |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public boolean | equals(Object
the object to compare against obj)Overrides com. |
| public StringBuffer | format(double number, StringBuffer toAppendTo, FieldPosition pos)
Implements abstract com. |
| public StringBuffer | format(long numberL, StringBuffer toAppendTo, FieldPosition pos)
Implements abstract com. |
| public StringBuffer | format(BigInteger number, StringBuffer toAppendTo, FieldPosition pos)
Implements abstract com. ICU |
| public StringBuffer | format(BigDecimal number, StringBuffer toAppendTo, FieldPosition pos)
Implements abstract com. ICU |
| public StringBuffer | format(BigDecimal number, StringBuffer toAppendTo, FieldPosition pos)
Implements abstract com. ICU |
| public char[] | |
| public int | getMaximumIntegerDigits()
Overrides com. |
| public int | getMinimumIntegerDigits()
Overrides com. |
| public char | |
| public int | hashCode()
Overrides com. |
| private void | |
| public Number | parse(String text, ParsePosition parsePosition)
Implements abstract com. |
| private void | readObject(ObjectInputStream stream)
First, read in the default serializable data.
|
| public void | setMaximumIntegerDigits(int
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. newValue)Overrides com. |
| public void | setMinimumIntegerDigits(int
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. newValue)Overrides com. |
| public void | |
| public void |
| CACHE | back to summary |
|---|---|
| private static SimpleCache<ULocale, char[]> CACHE | |
| DECIMAL_BUF_SIZE | back to summary |
|---|---|
| private static final int DECIMAL_BUF_SIZE | |
| decimalBuf | back to summary |
|---|---|
| private transient char[] decimalBuf | |
| digits | back to summary |
|---|---|
| private char[] digits | |
| maxIntDigits | back to summary |
|---|---|
| private int maxIntDigits | |
| minIntDigits | back to summary |
|---|---|
| private int minIntDigits | |
| minusSign | back to summary |
|---|---|
| private char minusSign | |
| PARSE_THRESHOLD | back to summary |
|---|---|
| private static final long PARSE_THRESHOLD | |
| positiveOnly | back to summary |
|---|---|
| private boolean positiveOnly | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| zeroDigit | back to summary |
|---|---|
| private char zeroDigit | |
| DateNumberFormat | back to summary |
|---|---|
| public DateNumberFormat(ULocale loc, String digitString, String nsName) | |
| DateNumberFormat | back to summary |
|---|---|
| public DateNumberFormat(ULocale loc, char zeroDigit, String nsName) | |
| clone | back to summary |
|---|---|
| public Object clone() Overrides com. Doc from com. Overrides clone.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides com. Doc from com. Overrides equals. Two NumberFormats are equal they are of the same class and the user-specified values for settings (groupingUsed, parseIntegerOnly, maximumIntegerDigits, etc.) are equal. | |
| format | back to summary |
|---|---|
| public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) Implements abstract com. Doc from com. Specialization of format.
| |
| format | back to summary |
|---|---|
| public StringBuffer format(long numberL, StringBuffer toAppendTo, FieldPosition pos) Implements abstract com. Doc from com. Specialization of format.
| |
| format | back to summary |
|---|---|
| public StringBuffer format(BigInteger number, StringBuffer toAppendTo, FieldPosition pos) Implements abstract com. Doc from com. ICU
| |
| format | back to summary |
|---|---|
| public StringBuffer format(BigDecimal number, StringBuffer toAppendTo, FieldPosition pos) Implements abstract com. Doc from com. ICU
| |
| format | back to summary |
|---|---|
| public StringBuffer format(BigDecimal number, StringBuffer toAppendTo, FieldPosition pos) Implements abstract com. Doc from com. ICU
| |
| getDigits | back to summary |
|---|---|
| public char[] getDigits() | |
| getMaximumIntegerDigits | back to summary |
|---|---|
| public int getMaximumIntegerDigits() Overrides com. Doc from com. Returns the maximum number of digits allowed in the integer portion of a number. The default value is 40, which subclasses can override. When formatting, if the number of digits exceeds this value, the highest- significance digits are truncated until the limit is reached, in accordance with UTS#35. This setting has no effect on parsing.
| |
| getMinimumIntegerDigits | back to summary |
|---|---|
| public int getMinimumIntegerDigits() Overrides com. Doc from com. Returns the minimum number of digits allowed in the integer portion of a number. The default value is 1, which subclasses can override. When formatting, if this value is not reached, numbers are padded on the left with the locale-specific '0' character to ensure at least this number of integer digits. When parsing, this has no effect.
| |
| getZeroDigit | back to summary |
|---|---|
| public char getZeroDigit() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides com. Doc from com. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| initialize | back to summary |
|---|---|
| private void initialize(ULocale loc, String digitString, String nsName) | |
| parse | back to summary |
|---|---|
| public Number parse(String text, ParsePosition parsePosition) Implements abstract com. Doc from com. Returns a Long if possible (e.g., within the range [Long.MIN_VALUE, Long.MAX_VALUE] and with no decimals); otherwise, returns another type, such as a BigDecimal, BigInteger, or Double. The return type is not guaranteed other than for the Long case. If IntegerOnly is set, will stop at a decimal point (or equivalent; e.g., for rational numbers "1 2/3", will stop after the 1). Does not throw an exception; if no object can be parsed, index is unchanged! For more detail on parsing, see the "Parsing" header in the class
documentation of
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException Hides com. Doc from com. First, read in the default serializable data.
Then, if | |
| setMaximumIntegerDigits | back to summary |
|---|---|
| public void setMaximumIntegerDigits(int newValue) Overrides com. Doc from com. Sets the maximum number of digits allowed in the integer portion of a number. This must be >= minimumIntegerDigits. If the new value for maximumIntegerDigits is less than the current value of minimumIntegerDigits, then minimumIntegerDigits will also be set to the new value.
| |
| setMinimumIntegerDigits | back to summary |
|---|---|
| public void setMinimumIntegerDigits(int newValue) Overrides com. Doc from com. Sets the minimum number of digits allowed in the integer portion of a number. This must be <= maximumIntegerDigits. If the new value for minimumIntegerDigits is more than the current value of maximumIntegerDigits, then maximumIntegerDigits will also be set to the new value.
| |
| setParsePositiveOnly | back to summary |
|---|---|
| public void setParsePositiveOnly(boolean isPositiveOnly) | |
| setZeroDigit | back to summary |
|---|---|
| public void setZeroDigit(char zero) | |