|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.karlockhart.util.config.configurator.Configurator
public class Configurator
| Method Summary | |
|---|---|
boolean |
getExistOrDefaultBool(java.lang.String key,
boolean value)
If the value contains the key return it and if not set the passed value. |
int |
getExistOrDefaultInt(java.lang.String key,
int value)
If the value contains the key return it and if not set the passed value. |
java.lang.String |
getExistOrDefaultStr(java.lang.String key,
java.lang.String value)
If the value contains the key return it and if not set the passed value. |
static Configurator |
getInstance()
This is the getInstance method of the Singleton Configurator. |
boolean |
getPropertyBool(java.lang.String key)
Returns the value of the property referred to by this key. |
int |
getPropertyInt(java.lang.String key)
Returns the value of the property referred to by this key. |
java.lang.String |
getPropertyStr(java.lang.String key)
Returns the value of the property referred to by this key. |
boolean |
isBoolSet(java.lang.String key)
Returns true if this key exists and false if it does not. |
boolean |
isIntSet(java.lang.String key)
Returns true if this key exists and false if it does not. |
boolean |
isStrSet(java.lang.String key)
Returns true if this key exists and false if it does not. |
void |
removeBoolKey(java.lang.String key)
Deletes the property related to this key. |
void |
removeIntKey(java.lang.String key)
Deletes the property related to this key. |
void |
removeStrKey(java.lang.String key)
Deletes the property related to this key. |
void |
setPropertyBool(java.lang.String key,
boolean value)
|
void |
setPropertyInt(java.lang.String key,
int value)
Sets the value for the provided key. |
void |
setPropertyStr(java.lang.String key,
java.lang.String value)
Sets the value for the provided key. |
void |
writeConfiguration()
Writes the configuration file to disk using serialization of the Configurator object. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Configurator getInstance()
public boolean getPropertyBool(java.lang.String key)
key - The text key that refers to the property you wish to retrieve
public void setPropertyBool(java.lang.String key,
boolean value)
public boolean isBoolSet(java.lang.String key)
key - The key to check for existence.public void removeBoolKey(java.lang.String key)
key - The key whose property will be deleted.
public boolean getExistOrDefaultBool(java.lang.String key,
boolean value)
key - The key to check for existence.value - The value to set if this key does not exist
public int getPropertyInt(java.lang.String key)
key - The text key that refers to the property you wish to retrieve
public void setPropertyInt(java.lang.String key,
int value)
key - The text key that the value is to be set for.value - The value to set in the property.public boolean isIntSet(java.lang.String key)
key - The key to check for existence.public void removeIntKey(java.lang.String key)
key - The key whose property will be deleted.
public int getExistOrDefaultInt(java.lang.String key,
int value)
key - The key to check for existence.value - The value to set if this key does not exist
public java.lang.String getPropertyStr(java.lang.String key)
key - The text key that refers to the property you wish to retrieve
public void setPropertyStr(java.lang.String key,
java.lang.String value)
key - The text key that the value is to be set for.value - The value to set in the property.public boolean isStrSet(java.lang.String key)
key - The key to check for existence.
public java.lang.String getExistOrDefaultStr(java.lang.String key,
java.lang.String value)
key - The key to check for existence.value - The value to set if this key does not exist
public void removeStrKey(java.lang.String key)
key - The key whose property will be deleted.public void writeConfiguration()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||