|
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.klafbang.tincpn.animation.plugin.DataStore
public class DataStore
Simple storage for simple data-types.
Often, you would like to store some data for keeping your animation up to date, or your would tike to gather data for a log or statistics. ML is not well-suited for this, so this animation object provides this service.
Apart from being usefull in itself, this animation object shows how easy it is to communicate with general Java objects.
Constructor Summary | |
---|---|
DataStore(java.lang.String name,
java.lang.String id)
Constructs a DataStore object. |
Method Summary | |
---|---|
int |
decrement(java.lang.String key)
Decrement an integer in the storage with the specified key. |
boolean |
flipBoolean(java.lang.String key)
Flip a boolean value in the storage with the given key. |
boolean |
getBoolean(java.lang.String key)
Get a boolean value from the storage with the specified key. |
java.lang.String |
getString(java.lang.String key)
Look up the (string) value for a given key. |
int |
increment(java.lang.String key)
Increment an integer in the storage with the specified key. |
boolean |
putBoolean(java.lang.String key,
boolean value)
Set a boolean value in the storage with the given key. |
java.lang.String |
putString(java.lang.String key,
java.lang.String value)
Put a string value into the storage with the specified key. |
void |
reset()
Reset the store to its initial value. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataStore(java.lang.String name, java.lang.String id)
name
- The name of the storeid
- Method Detail |
---|
public void reset()
public java.lang.String putString(java.lang.String key, java.lang.String value)
key
- the keyvalue
- the value
public java.lang.String getString(java.lang.String key)
key
- the key
public int increment(java.lang.String key)
key
- the key
public int decrement(java.lang.String key)
key
- the key
public boolean putBoolean(java.lang.String key, boolean value)
key
- the keyvalue
- the value to store
public boolean getBoolean(java.lang.String key)
key
- the key
public boolean flipBoolean(java.lang.String key)
key
- the key
|
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |