|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.plumtree.openfoundation.util.XPFormat
public final class XPFormat
XPFormat provides methods for inserting formatted versions of numeric and date values into a format pattern string according to the numeric and date formats of a specified locale or the runtime default. Other objects are inserted in the form derived from toString(). If no locale or a null locale is specified, the runtime default is used to provide a localized format for numeric and date values. Note that the runtime default is not necessarily "en-us", so set an explicit locale value if you need to rely on numeric and date format results.
| Constructor Summary | |
|---|---|
XPFormat()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
Format(java.lang.String pattern,
java.lang.Object[] args)
Returns pattern with formatted objects. |
static java.lang.String |
Format(XPLocale inLocale,
double number)
Converts a double to its equivalent string representation using the specified locale format information. |
static java.lang.String |
Format(XPLocale inLocale,
long number)
Converts a long to its equivalent string representation using the specified locale format information. |
static java.lang.String |
Format(XPLocale inLocale,
java.lang.String pattern,
java.lang.Object[] args)
Returns pattern with formatted objects using the specified locale format information. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XPFormat()
| Method Detail |
|---|
public static java.lang.String Format(XPLocale inLocale,
double number)
inLocale - - locale of the current setting, null means the operating system default locale.number - - number to be formatted
public static java.lang.String Format(XPLocale inLocale,
long number)
inLocale - - locale of the current setting. pass in NULL if the default locale is desirednumber - - number to be formatted
public static java.lang.String Format(java.lang.String pattern,
java.lang.Object[] args)
pattern - - string to be formatedargs - - expression objs to be formatted, valid objs types include
XPDateTime, numeric values and strings
XPIllegalArgumentException - - if pattern string is null
public static java.lang.String Format(XPLocale inLocale,
java.lang.String pattern,
java.lang.Object[] args)
inLocale - - an XPLocale to format the message in, null denotes the runtime default locale which may or may not be en-us.pattern - - string to be formatedargs - - expression objs to be formatted, valid objs types include
XPDateTime, numeric values and strings
XPIllegalArgumentException - - if pattern string is null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||