|
Luky Library - 4.1.1 (20061117-1148) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectluky.util.PropertyManager
public class PropertyManager
The property manager manages properties. It is actually a wrapper class around
the java.util.propery object which can be used to interface with it.
Major enhancement is the read file and write file function which are used to
read and write propery settings from a standarized file.
The file may have empty lines and comments starting with "#". The other lines
must be in the format :
label=value
Constructor Summary | |
---|---|
PropertyManager()
default constructor, allocates an empty propertyManager |
|
PropertyManager(Properties properties)
pre loaded constructor, allocates a propertyManager with pre loaded properties |
Method Summary | |
---|---|
int |
getIntProperty(String name)
gets the property specified by the parameter as an int |
Properties |
getProperties()
gets the properties with which the propertyManager is filed |
String |
getProperty(String name)
gets the property specified by the parameter |
int |
readFile(String fileName)
gets the properties from the file specified by fileName |
int |
setProperties(Properties newProps)
sets the properties to the property object passed to the property manager all previous settings are lost |
int |
setProperty(String name,
String value)
sets the property specified by the parameter name to the value specified by the parameter value |
int |
writeFile(String fileName)
writes the properties to the file specified by fileName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertyManager()
public PropertyManager(Properties properties)
properties
- the properties with which the propertyManager is createdMethod Detail |
---|
public int setProperties(Properties newProps)
newProps
- the properties with which the propertyManager is filled
public Properties getProperties()
public String getProperty(String name)
name
- property label name
public int getIntProperty(String name) throws NumberFormatException
NumberFormatException
name
- property label name
public int setProperty(String name, String value)
name
- property label namevalue
- the value of this label
public int readFile(String fileName)
fileName
- the name of the file from which the settings are read
public int writeFile(String fileName)
fileName
- the name of the file from to which the settings are written
|
Luky Library - 4.1.1 (20061117-1148) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |