- java.lang.Object
-
- util.settings.PropertyManager
-
public class PropertyManager extends java.lang.Object
- Author:
- Til Schneider, www.murfman.de
-
-
Constructor Summary
Constructors Constructor Description PropertyManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
addProperty(Property prop)
void
clearChanges()
java.lang.String
getProperty(java.lang.String key)
Gets the property with the given key.boolean
hasChanged(Property prop)
boolean
hasChanged(Property[] propArr)
void
readFromFile(java.io.File settingsFile)
void
readFromStream(java.io.InputStream in)
(package private) void
setProperty(java.lang.String key, java.lang.String value)
void
writeToFile(java.io.File settingsFile)
-
-
-
Method Detail
-
writeToFile
public void writeToFile(java.io.File settingsFile) throws java.io.IOException
- Throws:
java.io.IOException
-
readFromFile
public void readFromFile(java.io.File settingsFile) throws java.io.IOException
- Throws:
java.io.IOException
-
readFromStream
public void readFromStream(java.io.InputStream in) throws java.io.IOException
- Throws:
java.io.IOException
-
addProperty
void addProperty(Property prop)
-
setProperty
void setProperty(java.lang.String key, java.lang.String value)
-
getProperty
public java.lang.String getProperty(java.lang.String key)
Gets the property with the given key.- Parameters:
key
- The key to get the property for.- Returns:
- The property for the key or
null
if the key didn't exists.
-
hasChanged
public boolean hasChanged(Property prop)
-
hasChanged
public boolean hasChanged(Property[] propArr)
-
clearChanges
public void clearChanges()
-
-