public class DelegatedConfigSource extends Object implements IConfigSource
| Constructor and Description |
|---|
DelegatedConfigSource(IConfigSource configSource) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Delete the config file.
|
void |
disable() |
boolean |
fileExists()
Check if valid .json file exists.
|
<T> Optional<T> |
get(String key) |
<T> Optional<T> |
get(String key,
Class<T> asType) |
boolean |
has(String key) |
boolean |
isSection(String key) |
Set<String> |
keys() |
void |
put(String key,
Object value) |
void |
reload() |
void |
saveAll() |
static String[] |
toPath(String key) |
public DelegatedConfigSource(IConfigSource configSource)
public static String[] toPath(String key)
toPath in interface IConfigSourcepublic boolean fileExists()
IConfigSourcefileExists in interface IConfigSourcepublic <T> Optional<T> get(String key, Class<T> asType)
get in interface IConfigSourcepublic <T> Optional<T> get(String key)
get in interface IConfigSourcepublic void put(String key, Object value)
put in interface IConfigSourcepublic boolean has(String key)
has in interface IConfigSourcepublic Set<String> keys()
keys in interface IConfigSourcepublic boolean isSection(String key)
isSection in interface IConfigSourcepublic void reload()
reload in interface IConfigSourcepublic void saveAll()
saveAll in interface IConfigSourcepublic void disable()
disable in interface IConfigSourcepublic void delete()
IConfigSourcedelete in interface IConfigSource