public class GGProperties
extends java.lang.Object
| Constructor and Description |
|---|
GGProperties(java.lang.String propertiesPath)
Creates a GGProperties instance with given path to the properties file.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public GGProperties(java.lang.String propertiesPath)
propertiesPath - the path to the properties filepublic java.lang.String getStringValue(java.lang.String key)
key - the key of the propertypublic java.lang.Integer getIntValue(java.lang.String key)
key - the key of the propertypublic java.lang.Double getDoubleValue(java.lang.String key)
key - the key of the propertypublic boolean setStringProperty(java.lang.String key,
java.lang.String value)
key - the key to create or modifyvalue - the String value associated to the keypublic boolean setIntProperty(java.lang.String key,
int value)
key - the key to create or modifyvalue - the integer value associated to the keypublic boolean setDoubleProperty(java.lang.String key,
double value)
key - the key to create or modifyvalue - the double value associated to the keypublic boolean remove(java.lang.String key)
key - the key to removepublic boolean removeAll()