Constructor and Description |
---|
Config()
Creates an empty config.
|
Config(Config config) |
Config(Map<String,? extends Object> map)
Copies config into a map.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(String key) |
boolean |
getBooleanValue(String propertyName)
Gets the value of a property as a boolean.
|
boolean |
getBooleanValue(String propertyName,
boolean defaultValue) |
<E extends Enum<E>> |
getEnumValue(String propertyName,
E defaultValue)
Gets the value of a property as an enum.
|
int |
getIntegerValue(String propertyName,
int defaultValue)
Gets the value of a property as an integer.
|
<T> T |
getObject(String key,
T defaultValue) |
Optional<InclusionRule> |
getOptionalInclusionRule(String includePatternProperty,
String excludePatternProperty) |
String |
getStringValue(String propertyName,
String defaultValue)
Gets the value of a property as a string.
|
Map<String,Object> |
getSubMap(String propertyName) |
void |
merge(Config config) |
Object |
put(String key,
Object value)
Put an key-value pair into the config.
|
int |
size() |
String |
toString() |
public static final Logger LOGGER
public Config()
public Config(Config config)
public boolean containsKey(String key)
public boolean getBooleanValue(String propertyName)
propertyName
- Property namepublic boolean getBooleanValue(String propertyName, boolean defaultValue)
public <E extends Enum<E>> E getEnumValue(String propertyName, E defaultValue)
propertyName
- Property namepublic int getIntegerValue(String propertyName, int defaultValue)
propertyName
- Property namepublic <T> T getObject(String key, T defaultValue) throws ClassCastException
ClassCastException
public Optional<InclusionRule> getOptionalInclusionRule(String includePatternProperty, String excludePatternProperty)
public String getStringValue(String propertyName, String defaultValue)
propertyName
- Property namedefaultValue
- Default valuepublic void merge(Config config)
public Object put(String key, Object value)
key
- Key of the config map.value
- Value of the config map.Map.put(java.lang.Object, java.lang.Object)
public int size()
Copyright © 2000-2025 Sualeh Fatehi. All rights reserved.