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 IConfigSource
public boolean fileExists()
IConfigSource
fileExists
in interface IConfigSource
public <T> Optional<T> get(String key, Class<T> asType)
get
in interface IConfigSource
public <T> Optional<T> get(String key)
get
in interface IConfigSource
public void put(String key, Object value)
put
in interface IConfigSource
public boolean has(String key)
has
in interface IConfigSource
public Set<String> keys()
keys
in interface IConfigSource
public boolean isSection(String key)
isSection
in interface IConfigSource
public void reload()
reload
in interface IConfigSource
public void saveAll()
saveAll
in interface IConfigSource
public void disable()
disable
in interface IConfigSource
public void delete()
IConfigSource
delete
in interface IConfigSource