| Package | Description |
|---|---|
| java.text |
Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
|
| java.text.spi |
Service provider classes for the classes in the java.text package.
|
| javax.swing.text |
Provides classes and interfaces that deal with editable and noneditable text components.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ChoiceFormat
A
ChoiceFormat allows you to attach a format to a range of numbers.
|
class |
DecimalFormat
DecimalFormat is a concrete subclass of
NumberFormat that formats decimal numbers.
|
| Modifier and Type | Field and Description |
|---|---|
protected NumberFormat |
DateFormat.numberFormat
The number formatter that
DateFormat uses to format numbers in dates and times.
|
| Modifier and Type | Method and Description |
|---|---|
static NumberFormat |
NumberFormat.getCurrencyInstance()
Returns a currency format for the current default
FORMAT locale.
|
static NumberFormat |
NumberFormat.getCurrencyInstance(Locale
Returns a currency format for the specified locale.
|
static NumberFormat |
NumberFormat.getInstance()
Returns a general-purpose number format for the current default
FORMAT locale.
|
static NumberFormat |
NumberFormat.getInstance(Locale
Returns a general-purpose number format for the specified locale.
|
static NumberFormat |
NumberFormat.getIntegerInstance()
Returns an integer number format for the current default
FORMAT locale.
|
static NumberFormat |
NumberFormat.getIntegerInstance(Locale
Returns an integer number format for the specified locale.
|
NumberFormat |
DateFormat.getNumberFormat()
Gets the number formatter which this date/time formatter uses to format and parse a time.
|
static NumberFormat |
NumberFormat.getNumberInstance()
Returns a general-purpose number format for the current default
FORMAT locale.
|
static NumberFormat |
NumberFormat.getNumberInstance(Locale
Returns a general-purpose number format for the specified locale.
|
static NumberFormat |
NumberFormat.getPercentInstance()
Returns a percentage format for the current default
FORMAT locale.
|
static NumberFormat |
NumberFormat.getPercentInstance(Locale
Returns a percentage format for the specified locale.
|
| Modifier and Type | Method and Description |
|---|---|
void |
DateFormat.setNumberFormat(NumberFormat
Allows you to set the number formatter.
|
| Modifier and Type | Method and Description |
|---|---|
abstract NumberFormat |
NumberFormatProvider.getCurrencyInstance(Locale
Returns a new
NumberFormat instance which formats monetary values for the specified locale.
|
abstract NumberFormat |
NumberFormatProvider.getIntegerInstance(Locale
Returns a new
NumberFormat instance which formats integer values for the specified locale.
|
abstract NumberFormat |
NumberFormatProvider.getNumberInstance(Locale
Returns a new general-purpose
NumberFormat instance for the specified locale.
|
abstract NumberFormat |
NumberFormatProvider.getPercentInstance(Locale
Returns a new
NumberFormat instance which formats percentage values for the specified locale.
|
| Constructor and Description | |
|---|---|
NumberFormatter(NumberFormat
Creates a NumberFormatter with the specified Format instance.
|