- java.lang.Object
-
- xyz.tozymc.configuration.memory.MemoryConfigSection
-
- xyz.tozymc.configuration.file.FileConfigSection
-
- xyz.tozymc.configuration.file.FileConfig
-
- xyz.tozymc.configuration.toml.TomlConfig
-
- All Implemented Interfaces:
xyz.tozymc.configuration.DataStorage,xyz.tozymc.configuration.TcConfig,xyz.tozymc.configuration.TcConfigSection
public class TomlConfig extends xyz.tozymc.configuration.file.FileConfigType ofFileConfigthat is store and handle with.tomlfile format.- Since:
- 1.0
- See Also:
TomlConfigBuilder
-
-
Constructor Summary
Constructors Constructor Description TomlConfig(@NotNull Path path)Constructs newTomlConfigwith configuration file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull TomlConfigOptionsgetOptions()protected Map<String,?>readToMap()protected StringwriteToString()-
Methods inherited from class xyz.tozymc.configuration.file.FileConfig
getPath, reload, reloadIfNeeded, save
-
Methods inherited from class xyz.tozymc.configuration.file.FileConfigSection
createChild, createChild, getKeys, getOrDefault, getRoot, getValues, getValuesWithoutReload, newSection, set, setIfAbsent
-
Methods inherited from class xyz.tozymc.configuration.memory.MemoryConfigSection
get, get, getChild, getFullPath, getName, getOrDefault, getParent, hasChild, reloadSection
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface xyz.tozymc.configuration.DataStorage
compute, computeIfAbsent, computeIfPresent, contains, contains, find, find, get, get, getBoolean, getDouble, getDoubleList, getInt, getIntegerList, getKeys, getKeys, getList, getList, getLong, getMapList, getOrDefault, getOrDefault, getString, getStringList, getValues, isBoolean, isDouble, isInt, isList, isLong, isString, merge, remove, replace, set, setIfAbsent
-
-
-
-
Constructor Detail
-
TomlConfig
public TomlConfig(@NotNull @NotNull Path path)
Constructs newTomlConfigwith configuration file.- Parameters:
path- The configuration file
-
-
Method Detail
-
readToMap
protected Map<String,?> readToMap() throws IOException
- Specified by:
readToMapin classxyz.tozymc.configuration.file.FileConfig- Throws:
IOException
-
writeToString
protected String writeToString()
- Specified by:
writeToStringin classxyz.tozymc.configuration.file.FileConfig
-
getOptions
@NotNull public @NotNull TomlConfigOptions getOptions()
- Specified by:
getOptionsin interfacexyz.tozymc.configuration.TcConfig- Overrides:
getOptionsin classxyz.tozymc.configuration.file.FileConfig
-
-