public class LocaleNumericFormat extends java.lang.Object implements IFormat
NumericFormat
,
DateTimeFormat
,
LocaleDateTimeFormat
,
LogicalFormat
,
IFormat
Modifier and Type | Field and Description |
---|---|
static int |
CURRENCY |
static int |
NUMBER |
static int |
PERCENT |
DATETIME, LOCALEDATETIME, LOCALENUMERIC, LOGICAL, NUMERIC
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(java.lang.Object obj)
Define quadbase.util.IFormat.
|
static LocaleNumericFormat |
getCurrencyInstance()
Create an instance of currency format for the default locale.
|
static LocaleNumericFormat |
getCurrencyInstance(java.util.Locale locale)
Create an instance of currency format for the specified locale.
|
int |
getFormatType()
Define quadbase.util.IFormat.
|
int |
getInstanceType()
Get the type of the instance.
|
java.text.NumberFormat |
getNumberFormat()
/** This method returns the java object from LocaleNumberFormat, and the returned value can
later be used to setup the format of the current instance.
|
static LocaleNumericFormat |
getNumberInstance()
Create an instance of numeric format for the default locale.
|
static LocaleNumericFormat |
getNumberInstance(java.util.Locale locale)
Create an instance of numeric format for the specified locale.
|
static LocaleNumericFormat |
getPercentInstance()
Create an instance of percentage format for the default locale.
|
static LocaleNumericFormat |
getPercentInstance(java.util.Locale locale)
Create an instance of percentage format for the specified locale.
|
void |
setFormat(LocaleNumericFormat obj)
Copy the following attributes of the object to this: maximum fraction digits, minimum
fraction digits, maximum integer digits, minimum integer digits, grouping and parse integer
only.
|
void |
setLocale(java.util.Locale locale) |
public static final int CURRENCY
public static final int NUMBER
public static final int PERCENT
public void setLocale(java.util.Locale locale)
public int getFormatType()
getFormatType
in interface IFormat
public java.lang.String format(java.lang.Object obj)
public static LocaleNumericFormat getCurrencyInstance()
public static LocaleNumericFormat getCurrencyInstance(java.util.Locale locale)
locale
- the specified localepublic static LocaleNumericFormat getNumberInstance()
public static LocaleNumericFormat getNumberInstance(java.util.Locale locale)
locale
- the specified localepublic static LocaleNumericFormat getPercentInstance()
public static LocaleNumericFormat getPercentInstance(java.util.Locale locale)
locale
- the specified localepublic java.text.NumberFormat getNumberFormat()
public int getInstanceType()
public void setFormat(LocaleNumericFormat obj)
obj
- Another LocaleNumericFormat instanceNumberFormat