Class DateNumberFormat
java.lang.Object
java.text.Format
org.graalvm.shadowed.com.ibm.icu.text.UFormat
org.graalvm.shadowed.com.ibm.icu.text.NumberFormat
org.graalvm.shadowed.com.ibm.icu.impl.DateNumberFormat
-
Nested Class Summary
Nested classes/interfaces inherited from class org.graalvm.shadowed.com.ibm.icu.text.NumberFormat
NumberFormat.Field, NumberFormat.NumberFormatFactory, NumberFormat.SimpleNumberFormatFactoryNested classes/interfaces inherited from class org.graalvm.shadowed.com.ibm.icu.text.UFormat
UFormat.SpanField -
Field Summary
Fields inherited from class org.graalvm.shadowed.com.ibm.icu.text.NumberFormat
ACCOUNTINGCURRENCYSTYLE, CASHCURRENCYSTYLE, CURRENCYSTYLE, FRACTION_FIELD, INTEGER_FIELD, INTEGERSTYLE, ISOCURRENCYSTYLE, NUMBERSTYLE, PERCENTSTYLE, PLURALCURRENCYSTYLE, SCIENTIFICSTYLE, STANDARDCURRENCYSTYLE -
Constructor Summary
ConstructorsConstructorDescriptionDateNumberFormat(ULocale loc, char zeroDigit, String nsName) DateNumberFormat(ULocale loc, String digitString, String nsName) -
Method Summary
Modifier and TypeMethodDescriptionclone()Overrides clone.booleanOverrides equals.format(double number, StringBuffer toAppendTo, FieldPosition pos) Specialization of format.format(long numberL, StringBuffer toAppendTo, FieldPosition pos) Specialization of format.format(BigDecimal number, StringBuffer toAppendTo, FieldPosition pos) Formats a BigDecimal.format(BigInteger number, StringBuffer toAppendTo, FieldPosition pos) Formats a BigInteger.format(BigDecimal number, StringBuffer toAppendTo, FieldPosition pos) Formats an ICU BigDecimal.char[]intReturns the maximum number of digits allowed in the integer portion of a number.intReturns the minimum number of digits allowed in the integer portion of a number.charinthashCode()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, returns another type, such as a BigDecimal, BigInteger, or Double.voidsetMaximumIntegerDigits(int newValue) Sets the maximum number of digits allowed in the integer portion of a number.voidsetMinimumIntegerDigits(int newValue) Sets the minimum number of digits allowed in the integer portion of a number.voidsetParsePositiveOnly(boolean isPositiveOnly) voidsetZeroDigit(char zero) Methods inherited from class org.graalvm.shadowed.com.ibm.icu.text.NumberFormat
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, getPatternForStyle, getPatternForStyleAndNumberingSystem, getPercentInstance, getPercentInstance, getPercentInstance, getRoundingMode, getScientificInstance, getScientificInstance, getScientificInstance, isGroupingUsed, isParseIntegerOnly, isParseStrict, parse, parseCurrency, parseObject, registerFactory, setContext, setCurrency, setGroupingUsed, setMaximumFractionDigits, setMinimumFractionDigits, setParseIntegerOnly, setParseStrict, setRoundingMode, unregisterMethods inherited from class java.text.Format
format, formatToCharacterIterator, parseObject
-
Constructor Details
-
DateNumberFormat
-
DateNumberFormat
-
-
Method Details
-
setMaximumIntegerDigits
public void setMaximumIntegerDigits(int newValue) Description copied from class:NumberFormatSets 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.- Overrides:
setMaximumIntegerDigitsin classNumberFormat- Parameters:
newValue- 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.- See Also:
-
getMaximumIntegerDigits
public int getMaximumIntegerDigits()Description copied from class:NumberFormatReturns 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.- Overrides:
getMaximumIntegerDigitsin classNumberFormat- Returns:
- the maximum number of integer digits
- See Also:
-
setMinimumIntegerDigits
public void setMinimumIntegerDigits(int newValue) Description copied from class:NumberFormatSets 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.- Overrides:
setMinimumIntegerDigitsin classNumberFormat- Parameters:
newValue- 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.- See Also:
-
getMinimumIntegerDigits
public int getMinimumIntegerDigits()Description copied from class:NumberFormatReturns 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.- Overrides:
getMinimumIntegerDigitsin classNumberFormat- Returns:
- the minimum number of integer digits
- See Also:
-
setParsePositiveOnly
public void setParsePositiveOnly(boolean isPositiveOnly) -
getZeroDigit
public char getZeroDigit() -
setZeroDigit
public void setZeroDigit(char zero) -
getDigits
public char[] getDigits() -
format
Description copied from class:NumberFormatSpecialization of format.- Specified by:
formatin classNumberFormat- See Also:
-
format
Description copied from class:NumberFormatSpecialization of format.- Specified by:
formatin classNumberFormat- See Also:
-
format
Description copied from class:NumberFormatFormats a BigInteger. Specialization of format.- Specified by:
formatin classNumberFormat- See Also:
-
format
Description copied from class:NumberFormatFormats a BigDecimal. Specialization of format.- Specified by:
formatin classNumberFormat- See Also:
-
format
Description copied from class:NumberFormatFormats an ICU BigDecimal. Specialization of format.- Specified by:
formatin classNumberFormat- See Also:
-
parse
Description copied from class:NumberFormatReturns 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
DecimalFormat.- Specified by:
parsein classNumberFormat- See Also:
-
equals
Description copied from class:NumberFormatOverrides equals. Two NumberFormats are equal they are of the same class and the user-specified values for settings (groupingUsed, parseIntegerOnly, maximumIntegerDigits, etc.) are equal.- Overrides:
equalsin classNumberFormat- Parameters:
obj- the object to compare against- Returns:
- true if the object is equal to this.
-
hashCode
public int hashCode()Description copied from class:NumberFormat- Overrides:
hashCodein classNumberFormat
-
clone
-