|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.aplu.jgamegrid.GGProperties
public class GGProperties
Helper class to simplify storage and retrieval of persistent data. The data stored can be retrieved at the next program execution.
Constructor Summary | |
---|---|
GGProperties(java.lang.String propertiesPath)
Creates a GGProperties instance with given path to the properties file. |
Method Summary | |
---|---|
java.lang.Double |
getDoubleValue(java.lang.String key)
Gets the property value with the given key as double. |
java.lang.Integer |
getIntValue(java.lang.String key)
Gets the property value with the given key as int. |
java.lang.String |
getStringValue(java.lang.String key)
Gets the property value with the given key as string. |
boolean |
remove(java.lang.String key)
If the properties file exists and has write access, remove the property with given key. |
boolean |
removeAll()
If the properties file has write access, removes it. |
boolean |
setDoubleProperty(java.lang.String key,
double value)
If the properties file exists and has write access, creates or modifies the property value with given key. |
boolean |
setIntProperty(java.lang.String key,
int value)
If the properties file exists and has write access, creates or modifies the property value with given key. |
boolean |
setStringProperty(java.lang.String key,
java.lang.String value)
If the properties file exists and has write access, creates or modifies the property value with given key. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GGProperties(java.lang.String propertiesPath)
propertiesPath
- the path to the properties fileMethod Detail |
---|
public java.lang.String getStringValue(java.lang.String key)
key
- the key of the property
public java.lang.Integer getIntValue(java.lang.String key)
key
- the key of the property
public java.lang.Double getDoubleValue(java.lang.String key)
key
- the key of the property
public boolean setStringProperty(java.lang.String key, java.lang.String value)
key
- the key to create or modifyvalue
- the String value associated to the key
public boolean setIntProperty(java.lang.String key, int value)
key
- the key to create or modifyvalue
- the integer value associated to the key
public boolean setDoubleProperty(java.lang.String key, double value)
key
- the key to create or modifyvalue
- the double value associated to the key
public boolean remove(java.lang.String key)
key
- the key to remove
public boolean removeAll()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |