|
Oracle® Globalization Development Kit Java API Reference 10g Release 1(10.1) B10971-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.text.Format | +--oracle.i18n.text.OraNumberFormat
OraNumberFormat is an abstract class to do locale sensitive formatting and parsing between number and string. It supports Oracle number formatting behavior.
OraDecimalFormat
, Serialized FormNested Class Summary |
Nested classes inherited from class java.text.Format |
Format.Field |
Field Summary | |
static int |
ALL_FIELD Constant for ALL field alignment. |
static int |
FRACTION_FIELD Constant for FRACTION field alignment. |
static int |
INTEGER_FIELD Constant for INTEGER field alignment. |
Constructor Summary | |
OraNumberFormat() |
Method Summary | |
Object |
clone() Overrides the cloneable. |
boolean |
equals(Object obj) Overrides the equals. |
String |
format(BigDecimal number) Formats a BigDecimal into a string. |
abstract StringBuffer |
format(BigDecimal number, StringBuffer toAppendTo, FieldPosition position) Formats a BigDecimal into a string. |
String |
format(BigInteger number) Formats a BigInteger into a string. |
abstract StringBuffer |
format(BigInteger number, StringBuffer toAppendTo, FieldPosition position) Formats a BigInteger into a string. |
String |
format(double number) Formats a double into a string. |
abstract StringBuffer |
format(double number, StringBuffer toAppendTo, FieldPosition position) Formats a double into a string. |
String |
format(long number) Formats a long into a string. |
abstract StringBuffer |
format(long number, StringBuffer toAppendTo, FieldPosition position) Formats a long into a string. |
StringBuffer |
format(Object number, StringBuffer toAppendTo, FieldPosition position) Formats an Object into a string. |
static oracle.i18n.text.OraNumberFormat |
getCurrencyInstance() Returns a number formatter that uses the default currency format pattern for the default locale. |
static oracle.i18n.text.OraNumberFormat |
getCurrencyInstance(Locale locale) Returns a number formatter that uses the default currency format pattern for the given locale. |
static oracle.i18n.text.OraNumberFormat |
getCurrencyInstance(oracle.i18n.util.OraLocaleInfo localeInfo) Returns a number formatter that uses the default currency format pattern for the given OraLocaleInfo. |
static String |
getDefaultCurrencyFormatPattern(Locale locale) Returns the default currency format pattern for the given locale. |
static String |
getDefaultCurrencyFormatPattern(oracle.i18n.util.OraLocaleInfo localeInfo) Returns the default currency format pattern for the given OraLocaleInfo. |
static String |
getDefaultNumberFormatPattern(Locale locale) Returns the default number format pattern for the given locale. |
static String |
getDefaultNumberFormatPattern(oracle.i18n.util.OraLocaleInfo localeInfo) Returns the default number format pattern for the given OraLocaleInfo. |
static oracle.i18n.text.OraNumberFormat |
getInstance() Returns a number formatter that uses the default number format pattern for the default locale. |
static oracle.i18n.text.OraNumberFormat |
getInstance(Locale locale) Returns a number formatter that uses the default currency format pattern for the given locale. |
static oracle.i18n.text.OraNumberFormat |
getInstance(oracle.i18n.util.OraLocaleInfo localeInfo) Returns a number formatter that uses the default currency format pattern for the given OraLocaleInfo. |
static oracle.i18n.text.OraNumberFormat |
getNumberInstance() Returns a number formatter that uses the default number format pattern for the default locale. |
static oracle.i18n.text.OraNumberFormat |
getNumberInstance(Locale locale) Returns a number formatter that uses the default currency format pattern for the given locale. |
static oracle.i18n.text.OraNumberFormat |
getNumberInstance(oracle.i18n.util.OraLocaleInfo localeInfo) Returns a number formatter that uses the default currency format pattern for the given OraLocaleInfo. |
boolean |
isGroupingUsed() Checks if the grouping separator is used for this formatter. |
boolean |
isParseIntegerOnly() Checks if this formatter parses integer portion only. |
Number |
parse(String text) Parses a string into a Number. |
abstract Number |
parse(String text, ParsePosition parsePosition) Parses a string into a Number, starting from the given parse position. |
Object |
parseObject(String text, ParsePosition parsePosition) Parses a string into a (Number) Object, starting from the given parse position. |
void |
setGroupingUsed(boolean val) Sets the switch for grouping separator to the given boolean value. |
void |
setParseIntegerOnly(boolean val) Sets the switch for parsing interger only to the given boolean value. |
Methods inherited from class java.text.Format |
format, formatToCharacterIterator, parseObject |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int ALL_FIELD
public static final int INTEGER_FIELD
public static final int FRACTION_FIELD
Constructor Detail |
public OraNumberFormat()
Method Detail |
public static oracle.i18n.text.OraNumberFormat getCurrencyInstance()
public static oracle.i18n.text.OraNumberFormat getCurrencyInstance(Locale locale)
locale
- the given locale.public static oracle.i18n.text.OraNumberFormat getCurrencyInstance(oracle.i18n.util.OraLocaleInfo localeInfo)
localeInfo
- the given OraLocaleInfo.public static String getDefaultCurrencyFormatPattern(Locale locale)
locale
- the given locale."<positive pattern>;<negative pattern>"or
"<positive pattern>"if patterns for both positive and negative patterns are the same.
public static String getDefaultCurrencyFormatPattern(oracle.i18n.util.OraLocaleInfo localeInfo)
localeInfo
- the given OraLocaleInfo."<positive pattern>;<negative pattern>"or
"<positive pattern>"if patterns for both positive and negative patterns are the same.
public static String getDefaultNumberFormatPattern(Locale locale)
locale
- the given locale."<positive pattern>;<negative pattern>"or
"<positive pattern>"if patterns for both positive and negative patterns are the same.
public static String getDefaultNumberFormatPattern(oracle.i18n.util.OraLocaleInfo localeInfo)
localeInfo
- the given OraLocaleInfo."<positive pattern>;<negative pattern>"or
"<positive pattern>"if patterns for both positive and negative patterns are the same.
public static oracle.i18n.text.OraNumberFormat getInstance()
public static oracle.i18n.text.OraNumberFormat getInstance(Locale locale)
locale
- the given locale.public static oracle.i18n.text.OraNumberFormat getInstance(oracle.i18n.util.OraLocaleInfo localeInfo)
localeInfo
- the given OraLocaleInfo.public static oracle.i18n.text.OraNumberFormat getNumberInstance()
public static oracle.i18n.text.OraNumberFormat getNumberInstance(Locale locale)
locale
- the given locale.public static oracle.i18n.text.OraNumberFormat getNumberInstance(oracle.i18n.util.OraLocaleInfo localeInfo)
localeInfo
- the given OraLocaleInfo.public String format(BigDecimal number)
number
- the BigDecimal object to be formatted into a string.public String format(BigInteger number)
number
- the BigInteger object to be formatted into a string.public String format(double number)
number
- the double to be formatted into a string.public String format(long number)
number
- the long to be formatted into a string.public abstract StringBuffer format(BigDecimal number, StringBuffer toAppendTo, FieldPosition position)
number
- the BigDecimal object to be formatted into a string.toAppendTo
- the string buffer to be appended with the formatted string.public abstract StringBuffer format(BigInteger number, StringBuffer toAppendTo, FieldPosition position)
number
- the BigInteger object to be formatted into a string.toAppendTo
- the string buffer to be appended with the formatted string.public abstract StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition position)
number
- the double to be formatted into a string.toAppendTo
- the string buffer to be appended with the formatted string.public abstract StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition position)
number
- the long to be formatted into a string.toAppendTo
- the string buffer to be appended with the formatted string.public StringBuffer format(Object number, StringBuffer toAppendTo, FieldPosition position)
format
in class Format
toAppendTo
- the string buffer to be appended with the formatted string.IllegalArgumentException
- if the given object is not an instance of Number.public Number parse(String text) throws ParseException
text
- the string to be parsed.ParseException
- if the format pattern associated with this fromatter is not valid for parsing or the given string can not be parsed into a Number.public abstract Number parse(String text, ParsePosition parsePosition)
text
- the stringIllegalArgumentException
- if the format pattern associated with this fromatter is not valid for parsing or the given numerical string can not be parsed into a Date.public Object parseObject(String text, ParsePosition parsePosition)
parseObject
in class Format
parse(String, ParsePosition).
public boolean isGroupingUsed()
public void setGroupingUsed(boolean val)
val
- the given boolean value.public boolean isParseIntegerOnly()
public void setParseIntegerOnly(boolean val)
val
- the given boolean value.public Object clone()
clone
in class Format
public boolean equals(Object obj)
equals
in class Object
|
Oracle® Globalization Development Kit Java API Reference 10g Release 1(10.1) B10971-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |