|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.caff.maze.TemporaryDataStorage
public class TemporaryDataStorage
Data storage which has no access to the system. All data it stores is lost when the storage is gone.
Field Summary | |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
persistentData
The persistent data of this session. |
Constructor Summary | |
---|---|
TemporaryDataStorage()
|
Method Summary | |
---|---|
boolean |
getBoolean(java.lang.String key,
boolean defaultValue)
Get a persistent boolean value. |
java.awt.Color |
getColor(java.lang.String key,
java.awt.Color defaultValue)
Get a persistent color value. |
double |
getDouble(java.lang.String key,
double defaultValue)
Get a persistent double value. |
int |
getInt(java.lang.String key,
int defaultValue)
Get a persistent integer value. |
long |
getLong(java.lang.String key,
long defaultValue)
Get a persistent long integer value. |
java.lang.String |
getString(java.lang.String key,
java.lang.String defaultValue)
Get a persistent string value. |
boolean |
hasKey(java.lang.String key)
Is his key defined? |
void |
setBoolean(java.lang.String key,
boolean value)
Set a persistent boolean. |
void |
setColor(java.lang.String key,
java.awt.Color value)
Set a persistent color. |
void |
setDouble(java.lang.String key,
double value)
Set a persistent double value. |
void |
setInt(java.lang.String key,
int value)
Set a persistent integer value. |
void |
setLong(java.lang.String key,
long value)
Set a persistent long integer value. |
void |
setString(java.lang.String key,
java.lang.String value)
Set a persistent string. |
void |
storePersistentData()
Store all persistent data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Map<java.lang.String,java.lang.Object> persistentData
Constructor Detail |
---|
public TemporaryDataStorage()
Method Detail |
---|
public java.lang.String getString(java.lang.String key, java.lang.String defaultValue)
getString
in interface DataStorage
key
- key for the stringdefaultValue
- default value which is returned if the string is not defined
public void setString(java.lang.String key, java.lang.String value)
setString
in interface DataStorage
key
- key for the stringvalue
- the string value to storepublic boolean getBoolean(java.lang.String key, boolean defaultValue)
getBoolean
in interface DataStorage
key
- the key of the valuedefaultValue
- the default value if the key is not defined
public void setBoolean(java.lang.String key, boolean value)
setBoolean
in interface DataStorage
key
- key for the booleanvalue
- value of the booleanpublic java.awt.Color getColor(java.lang.String key, java.awt.Color defaultValue)
getColor
in interface DataStorage
key
- the key of the valuedefaultValue
- the default value if the key is not defined
public void setColor(java.lang.String key, java.awt.Color value)
setColor
in interface DataStorage
key
- key for the colorvalue
- value of the colorpublic int getInt(java.lang.String key, int defaultValue)
getInt
in interface DataStorage
key
- the key of the valuedefaultValue
- the default value if the key is not defined
public void setInt(java.lang.String key, int value)
setInt
in interface DataStorage
key
- key for the intvalue
- value of the intpublic long getLong(java.lang.String key, long defaultValue)
getLong
in interface DataStorage
key
- the key of the valuedefaultValue
- the default value if the key is not defined
public void setLong(java.lang.String key, long value)
setLong
in interface DataStorage
key
- key for the long intvalue
- value of the long intpublic double getDouble(java.lang.String key, double defaultValue)
getDouble
in interface DataStorage
key
- the key of the valuedefaultValue
- the default value if the key is not defined
public void setDouble(java.lang.String key, double value)
setDouble
in interface DataStorage
key
- key for the intvalue
- value of the intpublic boolean hasKey(java.lang.String key)
hasKey
in interface DataStorage
key
- key to look for
true
if the key is defined, false
otherwisepublic void storePersistentData()
storePersistentData
in interface DataStorage
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |