|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface to a memento used for saving the important state of an object in a form that can be persisted in the file system.
Mementos were designed with the following requirements in mind:
Mementos meet these requirements by providing support for storing a mapping of arbitrary string keys to primitive values, and by allowing mementos to have other mementos as children (arranged into a tree). A robust external storage format based on XML is used.
The key for an attribute may be any alpha numeric value. However, the value of TAG_ID is reserved for internal use.
This interface is not intended to be implemented or extended by clients.
Field Summary | |
static String | TAG_ID
Special reserved key used to store the memento id (value "org.eclipse.ui.id"). |
Method Summary | |
IMemento | createChild(String type)
Creates a new child of this memento with the given type. |
IMemento | createChild(String type,
String id)
Creates a new child of this memento with the given type and id. |
IMemento | getChild(String type)
Returns the first child with the given type id. |
IMemento[] | getChildren(String type)
Returns all children with the given type id. |
Float | getFloat(String key)
Returns the floating point value of the given key. |
String | getID()
Returns the id for this memento. |
Integer | getInteger(String key)
Returns the integer value of the given key. |
String | getString(String key)
Returns the string value of the given key. |
String | getTextData()
Returns the data of the Text node of the memento. |
void | putFloat(String key,
float value)
Sets the value of the given key to the given floating point number. |
void | putInteger(String key,
int value)
Sets the value of the given key to the given integer. |
void | putMemento(IMemento memento)
Copy the attributes and children from memento to the receiver. |
void | putString(String key,
String value)
Sets the value of the given key to the given string. |
void | putTextData(String data)
Sets the memento's Text node to contain the given data. |
Field Detail |
public static final String TAG_ID
Method Detail |
public IMemento createChild(String type)
The getChild and getChildren methods are used to retrieve children of a given type.
public IMemento createChild(String type, String id)
The getChild and getChildren methods are used to retrieve children of a given type.
public IMemento getChild(String type)
public IMemento[] getChildren(String type)
public Float getFloat(String key)
public String getID()
public Integer getInteger(String key)
public String getString(String key)
public String getTextData()
public void putFloat(String key, float value)
public void putInteger(String key, int value)
public void putMemento(IMemento memento)
public void putString(String key, String value)
public void putTextData(String data)
|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.