public class IsisConfigurationDefault extends Object implements IsisConfiguration
| Modifier and Type | Class and Description |
|---|---|
static class |
IsisConfigurationDefault.ContainsPolicy
How to handle the case when the configuration already contains the key being added.
|
| Constructor and Description |
|---|
IsisConfigurationDefault() |
IsisConfigurationDefault(ResourceStreamSource resourceStreamSource) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Properties properties)
Add the properties from an existing Properties object; if the key exists in the configuration then will be ignored.
|
void |
add(Properties properties,
IsisConfigurationDefault.ContainsPolicy policy)
Add the properties from an existing Properties object; if the key exists in the configuration then the
IsisConfigurationDefault.ContainsPolicy will be applied. |
void |
add(String key,
String value)
Adds a key-value pair to this set of properties; if the key exists in the configuration then will be ignored.
|
void |
add(String key,
String value,
IsisConfigurationDefault.ContainsPolicy policy)
Adds a key-value pair to this set of properties; if the key exists in the configuration then the
IsisConfigurationDefault.ContainsPolicy will be applied. |
Map<String,String> |
asMap()
A mutable copy of the current set of properties (name/values) held in this configuration.
|
IsisConfiguration |
createSubset(String prefix)
Creates a new IsisConfiguration containing the properties starting with
the specified prefix.
|
void |
debugData(DebugBuilder str)
Debug details describing the object being investigated
|
String |
debugTitle()
The title for the debug information
|
boolean |
getBoolean(String name)
Gets the boolean value for the specified name where no value or 'on' will
result in true being returned; anything gives false.
|
boolean |
getBoolean(String name,
boolean defaultValue)
Gets the boolean value for the specified name.
|
Color |
getColor(String name)
Gets the color for the specified name.
|
Color |
getColor(String name,
Color defaultValue)
Gets the color for the specified name.
|
Font |
getFont(String name)
Gets the font for the specified name.
|
Font |
getFont(String name,
Font defaultValue)
Gets the font for the specified name.
|
int |
getInteger(String name)
Gets the number value for the specified name.
|
int |
getInteger(String name,
int defaultValue)
Gets the number value for the specified name.
|
String[] |
getList(String name)
Returns a list of entries for the single configuration property with the
specified name.
|
IsisConfiguration |
getProperties(String withPrefix)
Creates a new IsisConfiguration containing the properties starting with
the specified prefix.
|
ResourceStreamSource |
getResourceStreamSource()
The
ResourceStreamSource that was used to build this
configuration. |
String |
getString(String name)
Returns the configuration property with the specified name.
|
String |
getString(String name,
String defaultValue) |
boolean |
hasProperty(String name) |
void |
injectInto(Object candidate)
Will inject itself into the candidate if the candidate implements the
corresponding *Aware type.
|
boolean |
isEmpty() |
Iterator<String> |
iterator()
Iterates over the property names of this configuration.
|
void |
put(Properties properties)
Add the properties from an existing Properties object; if the key exists in the configuration then will be overwritten.
|
void |
put(String key,
String value)
Adds a key-value pair to this set of properties; if the key exists in the configuration then will be replaced.
|
int |
size() |
String |
toString() |
public IsisConfigurationDefault()
public IsisConfigurationDefault(ResourceStreamSource resourceStreamSource)
public ResourceStreamSource getResourceStreamSource()
IsisConfigurationResourceStreamSource that was used to build this
configuration.getResourceStreamSource in interface IsisConfigurationIsisConfigurationBuilder.getResourceStreamSource()public void add(Properties properties)
public void put(Properties properties)
public void add(Properties properties, IsisConfigurationDefault.ContainsPolicy policy)
IsisConfigurationDefault.ContainsPolicy will be applied.add(Properties),
put(Properties)public void add(String key, String value)
public void put(String key, String value)
public void add(String key, String value, IsisConfigurationDefault.ContainsPolicy policy)
IsisConfigurationDefault.ContainsPolicy will be applied.add(String, String),
put(String, String)public IsisConfiguration createSubset(String prefix)
IsisConfigurationIsisConfiguration.getProperties(String)
method, except the property names have their prefixes removed.createSubset in interface IsisConfigurationIsisConfiguration.getProperties(String)public boolean getBoolean(String name)
getBoolean in interface IsisConfigurationname - the property namepublic boolean getBoolean(String name, boolean defaultValue)
getBoolean in interface IsisConfigurationname - the property namedefaultValue - the value to use as a defaultpublic Color getColor(String name)
getColor in interface IsisConfigurationname - the property namepublic Color getColor(String name, Color defaultValue)
getColor in interface IsisConfigurationname - the property namedefaultValue - the value to use as a defaultpublic void debugData(DebugBuilder str)
DebuggabledebugData in interface Debuggablepublic String debugTitle()
DebuggableWithTitledebugTitle in interface DebuggableWithTitlepublic Font getFont(String name)
getFont in interface IsisConfigurationname - the property namepublic Font getFont(String name, Font defaultValue)
getFont in interface IsisConfigurationname - the property namedefaultValue - the color to use as a defaultpublic int getInteger(String name)
getInteger in interface IsisConfigurationname - the property namepublic int getInteger(String name, int defaultValue)
getInteger in interface IsisConfigurationname - the property namedefaultValue - the value to use as a defaultpublic String[] getList(String name)
IsisConfigurationIf there is no matching property then returns an empty array.
getList in interface IsisConfigurationpublic IsisConfiguration getProperties(String withPrefix)
IsisConfigurationIsisConfiguration.createSubset(String) method except the names of the
properties are not altered when copied.getProperties in interface IsisConfigurationIsisConfiguration.createSubset(String)public String getString(String name)
getString in interface IsisConfigurationpublic String getString(String name, String defaultValue)
getString in interface IsisConfigurationpublic boolean hasProperty(String name)
hasProperty in interface IsisConfigurationpublic boolean isEmpty()
isEmpty in interface IsisConfigurationpublic Iterator<String> iterator()
IsisConfigurationiterator in interface Iterable<String>iterator in interface IsisConfigurationpublic int size()
size in interface IsisConfigurationpublic void injectInto(Object candidate)
InjectableinjectInto in interface Injectablepublic Map<String,String> asMap()
IsisConfigurationasMap in interface IsisConfigurationCopyright © 2010–2014 The Apache Software Foundation. All rights reserved.