public class HierarchicalConfig extends BaseConfig
| Modifier and Type | Class and Description |
|---|---|
class |
HierarchicalConfig.OverridingConfig
Helpful in Overriding Configs
|
| Constructor and Description |
|---|
HierarchicalConfig(BaseConfig... configs)
Instantiates a new Hierarchical config.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConfig(BaseConfig config)
Add config at the end
|
void |
addConfigFirst(BaseConfig config)
Add config at the start
|
ConfigInfo |
getConfigInfo(String... keys)
Gets the
ConfigInfo |
String |
getLevel()
The level of the configuration.
|
Properties |
getProperties()
Gets all the properties.
|
String |
getString(String defaultValue,
String... keys)
Returns the String value
|
protected String |
getStringInternal(String key)
Gets the String value of provided key
|
void |
setOverride(String key,
String value)
Overrides a property.
|
HierarchicalConfig |
withConfig(BaseConfig config)
With config hierarchical config.
|
getBoolean, getBooleanValue, getInteger, getIntegerValue, getLong, getLongValue, getValuepublic HierarchicalConfig(BaseConfig... configs)
configs - the configspublic HierarchicalConfig withConfig(BaseConfig config)
config - the configpublic void addConfigFirst(BaseConfig config)
config - the configpublic void addConfig(BaseConfig config)
config - the configpublic ConfigInfo getConfigInfo(String... keys)
BaseConfigConfigInfogetConfigInfo in class BaseConfigkeys - The keys in orderprotected String getStringInternal(String key)
BaseConfiggetStringInternal in class BaseConfigkey - The keypublic String getString(String defaultValue, String... keys)
BaseConfiggetString in class BaseConfigdefaultValue - The default valuekeys - The keys in orderpublic String getLevel()
BaseConfiggetLevel in class BaseConfigpublic Properties getProperties()
BaseConfiggetProperties in class BaseConfigpublic void setOverride(String key, String value)
BaseConfigsetOverride in class BaseConfigkey - the keyvalue - the valueCopyright © 2020. All rights reserved.