- java.lang.Object
-
- xyz.tozymc.configuration.memory.MemoryConfigSection
-
- xyz.tozymc.configuration.file.FileConfigSection
-
- xyz.tozymc.configuration.file.FileConfig
-
- xyz.tozymc.configuration.yaml.YamlConfig
-
- All Implemented Interfaces:
xyz.tozymc.configuration.DataStorage,xyz.tozymc.configuration.TcConfig,xyz.tozymc.configuration.TcConfigSection
public class YamlConfig extends xyz.tozymc.configuration.file.FileConfigType ofFileConfigthat is store and handle with.ymlfile format.- Since:
- 1.0
- See Also:
YamlConfigBuilder
-
-
Constructor Summary
Constructors Constructor Description YamlConfig(@NotNull Path path)Constructs newYamlConfigwith configuration file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull YamlConfigOptionsgetOptions()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
-
YamlConfig
public YamlConfig(@NotNull @NotNull Path path)
Constructs newYamlConfigwith 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 YamlConfigOptions getOptions()
- Specified by:
getOptionsin interfacexyz.tozymc.configuration.TcConfig- Overrides:
getOptionsin classxyz.tozymc.configuration.file.FileConfig
-
-