public class DefaultPropertyManager extends PropertyManager
| Modifier and Type | Field and Description |
|---|---|
protected Properties |
defaultProperties
The properties object.
|
protected File |
defaultPropFile
The path to the default property file.
|
| Constructor and Description |
|---|
DefaultPropertyManager()
Standard constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addOrUpdate(String key,
String value)
Add or update a property with the given key/value pair.
|
void |
delete(String key)
Delete a property with a given key.
|
boolean |
exists(String key)
Checks, whether or not a given property already exists
|
String |
get(String key)
Gets a property according to a given key.
|
static void |
main(String[] args) |
getManager, getProperty, getPropFile, read, read, setProperty, setPropFile, write, writeprotected File defaultPropFile
protected Properties defaultProperties
public void addOrUpdate(String key, String value)
key - the identifiervalue - the valuepublic void delete(String key)
key - the property name to be deletedpublic String get(String key)
key - null, if the
property does not exist.public boolean exists(String key)
key - an identifier for the propertytrue, if it exists, false otherwisepublic static void main(String[] args)
Copyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.