Uses of Class
com.ibm.icu.text.NumberFormat
-
Packages that use NumberFormat Package Description com.ibm.icu.text Extensions and enhancements to java.text to support unicode transforms, UnicodeSet, surrogate char utilities, UCA collation, normalization, break iteration (rule and dictionary based), enhanced number format, international string searching, and arabic shaping.com.ibm.icu.util International calendars and other utility classes. -
-
Uses of NumberFormat in com.ibm.icu.text
Subclasses of NumberFormat in com.ibm.icu.text Modifier and Type Class Description class
CompactDecimalFormat
Formats numbers in compact (abbreviated) notation, like "1.2K" instead of "1200".class
DecimalFormat
.class
RuleBasedNumberFormat
A class that formats numbers according to a set of rules.Fields in com.ibm.icu.text declared as NumberFormat Modifier and Type Field Description protected NumberFormat
DateFormat. numberFormat
The number formatter thatDateFormat
uses to format numbers in dates and times.Methods in com.ibm.icu.text that return NumberFormat Modifier and Type Method Description NumberFormat
NumberFormat.NumberFormatFactory. createFormat(ULocale loc, int formatType)
Returns a number format of the appropriate type.NumberFormat
NumberFormat.NumberFormatFactory. createFormat(java.util.Locale loc, int formatType)
Returns a number format of the appropriate type.static NumberFormat
NumberFormat. getCurrencyInstance()
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getCurrencyInstance(ULocale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getCurrencyInstance(java.util.Locale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getInstance()
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getInstance(int style)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getInstance(ULocale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getInstance(ULocale desiredLocale, int choice)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getInstance(java.util.Locale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getInstance(java.util.Locale inLocale, int style)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getIntegerInstance()
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getIntegerInstance(ULocale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getIntegerInstance(java.util.Locale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.NumberFormat
DateFormat. getNumberFormat()
Returns the number formatter which this date/time formatter uses to format and parse a time.NumberFormat
MeasureFormat. getNumberFormat()
Get a copy of the number format.NumberFormat
RelativeDateTimeFormatter. getNumberFormat()
Returns a copy of the NumberFormat this object is using.NumberFormat
SimpleDateFormat. getNumberFormat(char field)
give the NumberFormat used for the field like 'y'(year) and 'M'(year)NumberFormat
TimeUnitFormat. getNumberFormat()
Deprecated.ICU 53 seeMeasureFormat
.static NumberFormat
NumberFormat. getNumberInstance()
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getNumberInstance(ULocale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getNumberInstance(java.util.Locale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getPercentInstance()
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getPercentInstance(ULocale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getPercentInstance(java.util.Locale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getScientificInstance()
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getScientificInstance(ULocale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getScientificInstance(java.util.Locale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.Methods in com.ibm.icu.text with parameters of type NumberFormat Modifier and Type Method Description static MeasureFormat
MeasureFormat. getInstance(ULocale locale, MeasureFormat.FormatWidth formatWidth, NumberFormat format)
Create a format from the locale, formatWidth, and format.static MeasureFormat
MeasureFormat. getInstance(java.util.Locale locale, MeasureFormat.FormatWidth formatWidth, NumberFormat format)
Create a format from theLocale
, formatWidth, and format.static RelativeDateTimeFormatter
RelativeDateTimeFormatter. getInstance(ULocale locale, NumberFormat nf)
Returns a RelativeDateTimeFormatter for a particular locale that uses a particular NumberFormat object.static RelativeDateTimeFormatter
RelativeDateTimeFormatter. getInstance(ULocale locale, NumberFormat nf, RelativeDateTimeFormatter.Style style, DisplayContext capitalizationContext)
Returns a RelativeDateTimeFormatter for a particular locale that uses a particular NumberFormat object, style, and capitalization contextstatic RelativeDateTimeFormatter
RelativeDateTimeFormatter. getInstance(java.util.Locale locale, NumberFormat nf)
Returns a RelativeDateTimeFormatter for a particularLocale
that uses a particular NumberFormat object.void
DateFormat. setNumberFormat(NumberFormat newNumberFormat)
Sets the number formatter.void
PluralFormat. setNumberFormat(NumberFormat format)
Sets the number format used by this formatter.void
SimpleDateFormat. setNumberFormat(NumberFormat newNumberFormat)
Overrides superclass method and This method also clears per field NumberFormat instances previously set bySimpleDateFormat.setNumberFormat(String, NumberFormat)
void
SimpleDateFormat. setNumberFormat(java.lang.String fields, NumberFormat overrideNF)
allow the user to set the NumberFormat for several fields It can be a single field like: "y"(year) or "M"(month) It can be several field combined together: "yMd"(year, month and date) Note: 1 symbol field is enough for multiple symbol fields (so "y" will override "yy", "yyy") If the field is not numeric, then override has no effect (like "MMM" will use abbreviation, not numerical field)TimeUnitFormat
TimeUnitFormat. setNumberFormat(NumberFormat format)
Deprecated.ICU 53 seeMeasureFormat
.protected void
SimpleDateFormat. zeroPaddingNumber(NumberFormat nf, java.lang.StringBuffer buf, int value, int minDigits, int maxDigits)
Deprecated.This API is ICU internal only. -
Uses of NumberFormat in com.ibm.icu.util
Methods in com.ibm.icu.util that return NumberFormat Modifier and Type Method Description NumberFormat
GlobalizationPreferences. getNumberFormat(int style)
Gets a number format according to the current settings.protected NumberFormat
GlobalizationPreferences. guessNumberFormat(int style)
This function can be overridden by subclasses to use different heuristics.Methods in com.ibm.icu.util with parameters of type NumberFormat Modifier and Type Method Description GlobalizationPreferences
GlobalizationPreferences. setNumberFormat(int style, NumberFormat format)
Sets a number format explicitly.
-