public abstract class MapFileConfiguration extends AbstractFileConfiguration implements MutableFileConfiguration
mappers, NULL_BOOL, NULL_NUM, NULL_STRING
Modifier | Constructor and Description |
---|---|
protected |
MapFileConfiguration(java.util.function.Predicate<java.lang.String> match) |
protected |
MapFileConfiguration(java.util.function.Predicate<java.lang.String> match,
Mapper... mappers) |
Modifier and Type | Method and Description |
---|---|
protected abstract java.lang.String |
convert(java.util.Map<java.lang.String,java.lang.Object> items) |
java.lang.Object |
get(java.lang.String path)
Get an object at a specific path
|
java.lang.Boolean |
getBoolean(java.lang.String path)
Get a Boolean at a specific path
|
java.util.List<FileConfiguration> |
getConfigList(java.lang.String path)
Get a list of FileConfigurations at a specific path
|
FileConfiguration |
getConfigSection(java.lang.String path)
Get a config section as a FileConfiguration at a specific path
|
java.lang.Double |
getDouble(java.lang.String path)
Get a Double at a specific path
|
java.lang.Integer |
getInt(java.lang.String path)
Get an Integer at a specific path
|
<T> java.util.List<T> |
getList(java.lang.String path)
Get a List at a specific path
|
java.lang.Long |
getLong(java.lang.String path)
Get a Long at a specific path
|
java.lang.String |
getString(java.lang.String path)
Get an String at a specific path
|
java.util.List<java.lang.String> |
getStringList(java.lang.String path)
Get a list of strings at a specific path
|
protected void |
internalLoad(java.io.File file,
java.lang.String fileContent)
Optional code that will be executed on load
|
protected abstract java.util.Map<java.lang.String,java.lang.Object> |
provide(java.io.File file,
java.lang.String fileContent) |
protected java.util.Map<java.lang.String,java.lang.Object> |
retrieveAll() |
void |
save() |
void |
set(java.lang.String path,
java.lang.Object value) |
get, getAll, getBoolean, getConfigList, getConfigSection, getDouble, getFile, getInt, getList, getLong, getMatch, getString, getStringList, load
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, getBoolean, getConfigList, getConfigSection, getDouble, getInt, getList, getLong, getString, getStringList
protected MapFileConfiguration(java.util.function.Predicate<java.lang.String> match)
protected MapFileConfiguration(java.util.function.Predicate<java.lang.String> match, Mapper... mappers)
protected abstract java.util.Map<java.lang.String,java.lang.Object> provide(java.io.File file, java.lang.String fileContent)
protected abstract java.lang.String convert(java.util.Map<java.lang.String,java.lang.Object> items)
protected void internalLoad(java.io.File file, java.lang.String fileContent)
AbstractFileConfiguration
internalLoad
in class AbstractFileConfiguration
file
- File instancefileContent
- File's raw content as a Stringpublic java.lang.Object get(java.lang.String path)
FileConfiguration
get
in interface FileConfiguration
path
- Path of the objectpublic FileConfiguration getConfigSection(java.lang.String path)
FileConfiguration
getConfigSection
in interface FileConfiguration
path
- Path of the sectionpublic java.lang.String getString(java.lang.String path)
FileConfiguration
getString
in interface FileConfiguration
path
- Path of the Stringpublic java.lang.Integer getInt(java.lang.String path)
FileConfiguration
getInt
in interface FileConfiguration
path
- Path of the Integerpublic java.lang.Long getLong(java.lang.String path)
FileConfiguration
getLong
in interface FileConfiguration
path
- Path of the Longpublic java.lang.Double getDouble(java.lang.String path)
FileConfiguration
getDouble
in interface FileConfiguration
path
- Path of the Doublepublic java.lang.Boolean getBoolean(java.lang.String path)
FileConfiguration
getBoolean
in interface FileConfiguration
path
- Path of the Booleanpublic java.util.List<java.lang.String> getStringList(java.lang.String path)
FileConfiguration
getStringList
in interface FileConfiguration
path
- Path of the listpublic java.util.List<FileConfiguration> getConfigList(java.lang.String path)
FileConfiguration
getConfigList
in interface FileConfiguration
path
- Path of the listpublic <T> java.util.List<T> getList(java.lang.String path)
FileConfiguration
getList
in interface FileConfiguration
T
- Object typepath
- Path of the Listprotected java.util.Map<java.lang.String,java.lang.Object> retrieveAll()
retrieveAll
in class AbstractFileConfiguration
public void set(java.lang.String path, java.lang.Object value)
set
in interface MutableFileConfiguration
public void save() throws ConfigSaveException
save
in interface MutableFileConfiguration
ConfigSaveException