Class TomlConfig

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

    public class TomlConfig
    extends xyz.tozymc.configuration.file.FileConfig
    Type of FileConfig that is store and handle with .toml file format.
    Since:
    1.0
    See Also:
    TomlConfigBuilder
    • 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 TomlConfigOptions 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

      • TomlConfig

        public TomlConfig​(@NotNull
                          @NotNull Path path)
        Constructs new TomlConfig 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 TomlConfigOptions getOptions()
        Specified by:
        getOptions in interface xyz.tozymc.configuration.TcConfig
        Overrides:
        getOptions in class xyz.tozymc.configuration.file.FileConfig