public class YamlConfig
extends BaseConfig
Config implementation using the yaml format. SubConfigurations can return sub maps according to the yaml specification.
| Modifier and Type | Class and Description |
|---|---|
static class |
YamlConfig.Companion |
| Modifier and Type | Field and Description |
|---|---|
static YamlConfig.Companion |
Companion |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties() |
Config |
subConfig(java.lang.String key)
Tries to retrieve part of the configuration based on given key.
|
java.lang.String |
toString() |
<T> T |
valueOrDefault(java.lang.String key,
T p)
Retrieves a sub configuration or value based on given key. If configuration property cannot be found
the specified default value is returned.
|
<T> T |
valueOrNull(java.lang.String key)
Retrieves a sub configuration or value based on given key.
If the configuration property cannot be found, null is returned.
|
tryParseBasedOnDefault, valueOrDefaultInternalsubConfig, valueOrDefault, valueOrNullpublic static YamlConfig.Companion Companion
public Config subConfig(java.lang.String key)
Tries to retrieve part of the configuration based on given key.
public <T> T valueOrDefault(java.lang.String key,
T p)
Retrieves a sub configuration or value based on given key. If configuration property cannot be found the specified default value is returned.
public <T> T valueOrNull(java.lang.String key)
Retrieves a sub configuration or value based on given key. If the configuration property cannot be found, null is returned.
public java.lang.String toString()
public java.util.Map<java.lang.String,java.lang.Object> getProperties()