public final class SimpleProps
extends java.lang.Object
Constructor and Description |
---|
SimpleProps(java.lang.String filepath,
java.lang.String comment)
Constructor, requires
|
Modifier and Type | Method and Description |
---|---|
boolean |
delete()
Delete the properties file store
|
boolean |
getBool(java.lang.String property)
Get a boolean property
|
java.lang.String |
getChangedProperties()
Get a comma separated list of properties that were changed
|
int |
getInt(java.lang.String property)
Get an integer number property
|
long |
getLong(java.lang.String property)
Get a long number property
|
java.lang.String |
getString(java.lang.String key)
Get a String property
|
void |
load()
Load from xml file
|
void |
resetToDefaults()
Reset to defaults
|
void |
save()
Save to xml file
|
void |
setBool(java.lang.String property,
boolean enabled)
Set a boolean property
|
void |
setDefaultModeEnabled(boolean enabled)
Enable/disable default mode
|
void |
setInt(java.lang.String property,
int num)
Set a integer number property
|
void |
setLong(java.lang.String property,
long num)
Set a long number property
|
java.lang.Object |
setString(java.lang.String key,
java.lang.String value)
Set a String property
|
public SimpleProps(java.lang.String filepath, java.lang.String comment)
filepath
- comment
- public void setDefaultModeEnabled(boolean enabled)
enabled
- public void setLong(java.lang.String property, long num)
property
- num
- public long getLong(java.lang.String property)
property
- public void setInt(java.lang.String property, int num)
property
- num
- public int getInt(java.lang.String property)
property
- public void setBool(java.lang.String property, boolean enabled)
property
- enabled
- public boolean getBool(java.lang.String property)
property
- public java.lang.Object setString(java.lang.String key, java.lang.String value)
key
- value
- public java.lang.String getString(java.lang.String key)
key
- public void save()
public void load()
public boolean delete()
public java.lang.String getChangedProperties()
public void resetToDefaults()