public abstract class AbstractConfiguration extends Object implements Configuration
| Constructor and Description |
|---|
AbstractConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
String |
get(String key,
String... namespaces)
在多级命名空间中获取指定key的值,下级命名空间的值覆盖上级,例如
config.get("key","a","b","c")
则
a/b/c/key 高于
a/b/key 高于
a/key 高于
key
|
<T> T |
getValue(String key,
Common.Supplier<T> defaultValueSupplier,
String... namespace) |
<T> T |
getValue(String key,
T defaultValue,
String... namespace) |
protected abstract String |
search(String namespace,
List<String> keys) |
protected String |
search(String key,
List<String> namespaces,
int deep) |
protected List<String> |
toList(String... namespaces) |
public <T> T getValue(String key, Common.Supplier<T> defaultValueSupplier, String... namespace)
getValue in interface Configurationpublic <T> T getValue(String key, T defaultValue, String... namespace)
getValue in interface Configurationpublic String get(String key, String... namespaces)
Configuration
在多级命名空间中获取指定key的值,下级命名空间的值覆盖上级,例如
config.get("key","a","b","c")
则
a/b/c/key 高于
a/b/key 高于
a/key 高于
key
get in interface ConfigurationCopyright © 2020. All rights reserved.