|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.i18n.Format
Defines fundamental functionality for classes that format locale-sensitive information.
Examples of information that might be locale-sensitive are dates, system messages, and numbers.
Compatible with java.text.Format from Java's standard edition.
| Constructor Summary | ||
protected |
Format()
Constructs new Format instance. |
|
| Method Summary | ||
String |
format(Object obj)
Retrieves formatted string representation of object. |
|
abstract StringBuffer |
format(Object obj,
StringBuffer toAppendTo_o,
FieldPosition pos_io)
Retrieves formatted string represenatation of object in a string buffer. |
|
abstract int[] |
getFields()
Retrieves ordered list of fields. |
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
| Method Detail |
public final String format(Object obj)
Note: This method is not thread safe over each individual instance. No restrictions across instances.
obj - Object to format. This must always be an array.IllegalArgumentException - if the Format cannot format the given objectpublic abstract StringBuffer format(Object obj, StringBuffer toAppendTo_o, FieldPosition pos_io)
Subclasses should override this method to format particular kinds of data objects, returning the results in a string buffer.
obj - Object to format.toAppendTo_o - String buffer to hold the formatted results.pos_io - If not null, this method should invoke getFields()
and set the begin/end for this field during formatting.IllegalArgumentException - if the Format cannot format the given objectpublic abstract int[] getFields()
This method should return a list of fields, ordered left to right. Fields should only appear in this list if they exist in the format string used for formatting the output, or constraining the input. This information can then be used to determine the order in which the cursor traverses the information in a UI component that permits modification of the value in each format field.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2007 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.