|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ImmediateAccess is the access interface wrapper for simple DataItems which are not collections of other DataItems, and offers methods to extract the contained data as either a String or an Object.
The getPresentationString method differs from getValueAsString by including locale-specific formatting in the returned string. For example, getPresentationString might return "$100.00" while getValueAsString would return "100" for a DataItem.
Method Summary | |
java.lang.String |
getPresentationString(java.util.Locale locale)
Extracts the contained data in a String representation which includes appropriate formatting characters like "$" for the specified locale. |
java.lang.Object |
getValueAsObject()
Extracts the contained data as an Object. |
java.lang.String |
getValueAsString()
Extracts the contained data in a String representation, not necessarily equivalent to getValueAsObject.toString(). |
void |
setValue(java.lang.Object newValue)
This method sets a new value for the data in the ImmediateAccess. |
Method Detail |
public java.lang.String getValueAsString()
public java.lang.Object getValueAsObject()
public java.lang.String getPresentationString(java.util.Locale locale)
This method may throw UnsupportedOperationException to indicate that it does not support the specified locale.
locale
- the locale for which the returned String should be
formatted. Null indicates the producer's default locale.public void setValue(java.lang.Object newValue) throws InvalidDataException
This method may throw UnsupportedOperationException to indicate that setValue is not supported (its data is immutable).
newValue
- the new data to be copied
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |