|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.i18n.Format
public abstract class 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 |
|---|
protected Format()
| 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 object
public 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 Format.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: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal