Class YamlConfig

  • All Implemented Interfaces:
    xyz.tozymc.configuration.DataStorage, xyz.tozymc.configuration.TcConfig, xyz.tozymc.configuration.TcConfigSection

    public class YamlConfig
    extends xyz.tozymc.configuration.file.FileConfig
    Type of FileConfig that is store and handle with .yml file format.
    Since:
    1.0
    See Also:
    YamlConfigBuilder
    • Field Summary

      • Fields inherited from class xyz.tozymc.configuration.file.FileConfig

        options
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NotNull YamlConfigOptions getOptions()  
      protected Map<String,​?> readToMap()  
      protected String writeToString()  
      • 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 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
      • Methods inherited from interface xyz.tozymc.configuration.TcConfig

        getParent
      • Methods inherited from interface xyz.tozymc.configuration.TcConfigSection

        createChild, createChild, getChild, getFullPath, getName, getRoot, hasChild
    • Constructor Detail

      • YamlConfig

        public YamlConfig​(@NotNull
                          @NotNull Path path)
        Constructs new YamlConfig with configuration file.
        Parameters:
        path - The configuration file
    • Method Detail

      • readToMap

        protected Map<String,​?> readToMap()
                                         throws IOException
        Specified by:
        readToMap in class xyz.tozymc.configuration.file.FileConfig
        Throws:
        IOException
      • writeToString

        protected String writeToString()
        Specified by:
        writeToString in class xyz.tozymc.configuration.file.FileConfig
      • getOptions

        @NotNull
        public @NotNull YamlConfigOptions getOptions()
        Specified by:
        getOptions in interface xyz.tozymc.configuration.TcConfig
        Overrides:
        getOptions in class xyz.tozymc.configuration.file.FileConfig