public abstract class PropertiesSettings extends Object
If a property is a simple element with a text value then it is stored as a String using the element name as the property name. If the same element appears again then the element is converted to a List of values and further occurences are simply added to the List.
If a property element has child elements the children are recursively processed and added as a Map.
| Modifier and Type | Field and Description |
|---|---|
protected ConfigMap |
properties |
| Constructor and Description |
|---|
PropertiesSettings() |
| Modifier and Type | Method and Description |
|---|---|
void |
addProperties(ConfigMap p) |
void |
addProperty(String name,
ConfigMap value) |
void |
addProperty(String name,
String value) |
ConfigMap |
getProperties() |
String |
getProperty(String name) |
boolean |
getPropertyAsBoolean(String name,
boolean defaultValue) |
int |
getPropertyAsInt(String name,
int defaultValue) |
List |
getPropertyAsList(String name,
List defaultValue) |
long |
getPropertyAsLong(String name,
long defaultValue) |
ConfigMap |
getPropertyAsMap(String name,
ConfigMap defaultValue) |
String |
getPropertyAsString(String name,
String defaultValue) |
protected final ConfigMap properties
public final void addProperties(ConfigMap p)
public ConfigMap getProperties()
public final int getPropertyAsInt(String name, int defaultValue)
public final boolean getPropertyAsBoolean(String name, boolean defaultValue)
public final long getPropertyAsLong(String name, long defaultValue)
Copyright © 2015 The Apache Software Foundation. All rights reserved.