public class Defaults
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getDefault(java.lang.String key)
Searches for the property with the specified key in the
defaults list.
|
static java.lang.String |
getDefault(java.lang.String key,
java.lang.String defaultValue)
Searches for the property with the specified key in the
defaults list.
|
static Defaults |
getInstance()
Method for accessing a Defaults object.
|
static Defaults |
initialize(java.lang.String defaultsFile)
Method for creating or reinitializing a Defaults object.
|
static Defaults |
initialize(java.net.URL defaultsFile)
Method for creating or reinitializing a Defaults object.
|
void |
printProperties()
_more_
|
static void |
putDefault(java.lang.String key,
java.lang.String value)
Updates or adds a property to the defaults list.
|
static Defaults |
reset()
Reset the defaults using the system defaults file.
|
public static Defaults getInstance() throws java.lang.Exception
java.lang.Exception
initialize(java.net.URL)
,
reset()
public static Defaults initialize(java.net.URL defaultsFile)
reset
method.defaultsFile
- reset()
public static Defaults initialize(java.lang.String defaultsFile)
reset
method.defaultsFile
- reset()
public static Defaults reset()
public static java.lang.String getDefault(java.lang.String key)
null
.key
- the defaults key.null
.public static java.lang.String getDefault(java.lang.String key, java.lang.String defaultValue)
key
- the defaults key.defaultValue
- the default value to return if the key
does not existpublic static void putDefault(java.lang.String key, java.lang.String value)
key
- the defaults key to update or addvalue
- the value of the propertypublic void printProperties()