Interface CommentedFileConfig

All Superinterfaces:
AutoCloseable, CommentedConfig, Config, FileConfig, UnmodifiableCommentedConfig, UnmodifiableConfig
All Known Implementing Classes:
ConvertedCommentedFileConfig

public interface CommentedFileConfig extends CommentedConfig, FileConfig
  • Method Details

    • checked

      default CommentedFileConfig checked()
      Description copied from interface: Config
      Returns a checked view of the config. It checks that all the values put into the config are supported by the config's format (as per the ConfigFormat.supportsType(Class) method. Trying to insert an unsupported value throws an IllegalArgumentException.

      The values that are in the config when this method is called are also checked.

      Specified by:
      checked in interface CommentedConfig
      Specified by:
      checked in interface Config
      Specified by:
      checked in interface FileConfig
      Returns:
      a checked view of the config.
    • of

      static CommentedFileConfig of(File file)
      Creates a new FileConfig based on the specified file and format. The format is detected automatically.
      Parameters:
      file - the file to use to save and load the config
      Returns:
      a new FileConfig associated to the specified file
      Throws:
      NoFormatFoundException - if the format detection fails
    • of

      static CommentedFileConfig of(File file, ConfigFormat<? extends CommentedConfig> format)
      Creates a new FileConfig based on the specified file and format.
      Parameters:
      file - the file to use to save and load the config
      format - the config's format
      Returns:
      a new FileConfig associated to the specified file
    • of

      static CommentedFileConfig of(Path file)
      Creates a new FileConfig based on the specified file and format. The format is detected automatically.
      Parameters:
      file - the file to use to save and load the config
      Returns:
      a new FileConfig associated to the specified file
      Throws:
      NoFormatFoundException - if the format detection fails
    • of

      static CommentedFileConfig of(Path file, ConfigFormat<? extends CommentedConfig> format)
      Creates a new FileConfig based on the specified file and format.
      Parameters:
      file - the file to use to save and load the config
      format - the config's format
      Returns:
      a new FileConfig associated to the specified file
    • of

      static CommentedFileConfig of(String filePath)
      Creates a new FileConfig based on the specified file and format. The format is detected automatically.
      Parameters:
      filePath - the file's path
      Returns:
      a new FileConfig associated to the specified file
      Throws:
      NoFormatFoundException - if the format detection fails
    • of

      static CommentedFileConfig of(String filePath, ConfigFormat<? extends CommentedConfig> format)
      Creates a new FileConfig based on the specified file and format.
      Parameters:
      filePath - the file's path
      format - the config's format
      Returns:
      a new FileConfig associated to the specified file
    • ofConcurrent

      static CommentedFileConfig ofConcurrent(File file)
      Creates a new thread-safe CommentedFileConfig based on the specified file and format. The format is detected automatically.
      Parameters:
      file - the file to use to save and load the config
      Returns:
      a new thread-safe CommentedFileConfig associated to the specified file
      Throws:
      NoFormatFoundException - if the format detection fails
    • ofConcurrent

      static CommentedFileConfig ofConcurrent(File file, ConfigFormat<? extends CommentedConfig> format)
      Creates a new trhead-safe CommentedFileConfig based on the specified file and format.
      Parameters:
      file - the file to use to save and load the config
      format - the config's format
      Returns:
      a new thread-safe CommentedFileConfig associated to the specified file
    • ofConcurrent

      static CommentedFileConfig ofConcurrent(Path file)
      Creates a new thread-safe CommentedFileConfig based on the specified file and format. The format is detected automatically.
      Parameters:
      file - the file to use to save and load the config
      Returns:
      a new thread-safe CommentedFileConfig associated to the specified file
      Throws:
      NoFormatFoundException - if the format detection fails
    • ofConcurrent

      static CommentedFileConfig ofConcurrent(Path file, ConfigFormat<? extends CommentedConfig> format)
      Creates a new trhead-safe CommentedFileConfig based on the specified file and format.
      Parameters:
      file - the file to use to save and load the config
      format - the config's format
      Returns:
      a new thread-safe CommentedFileConfig associated to the specified file
    • ofConcurrent

      static CommentedFileConfig ofConcurrent(String filePath, ConfigFormat<? extends CommentedConfig> format)
      Creates a new trhead-safe CommentedFileConfig based on the specified file and format.
      Parameters:
      filePath - the file's path
      format - the config's format
      Returns:
      a new thread-safe CommentedFileConfig associated to the specified file
    • ofConcurrent

      static CommentedFileConfig ofConcurrent(String filePath)
      Creates a new trhead-safe CommentedFileConfig based on the specified file and format. The format is detected automatically.
      Parameters:
      filePath - the file's path
      Returns:
      a new thread-safe CommentedFileConfig associated to the specified file
      Throws:
      NoFormatFoundException - if the format detection fails
    • builder

      static CommentedFileConfigBuilder builder(File file, ConfigFormat<? extends CommentedConfig> format)
      Returns a CommentedFileConfigBuilder to create a CommentedFileConfig with many options.
      Parameters:
      file - the file to use to save and load the config
      format - the config's format
      Returns:
      a new FileConfigBuilder that will build a CommentedFileConfig associated to the specified file
    • builder

      static CommentedFileConfigBuilder builder(File file)
      Returns a CommentedFileConfigBuilder to create a CommentedFileConfig with many options. The format is detected automatically.
      Parameters:
      file - the file to use to save and load the config
      Returns:
      a new FileConfigBuilder that will build a CommentedFileConfig associated to the specified file
      Throws:
      NoFormatFoundException - if the format detection fails
    • builder

      static CommentedFileConfigBuilder builder(Path file, ConfigFormat<? extends CommentedConfig> format)
      Returns a CommentedFileConfigBuilder to create a CommentedFileConfig with many options.
      Parameters:
      file - the file to use to save and load the config
      format - the config's format
      Returns:
      a new FileConfigBuilder that will build a CommentedFileConfig associated to the specified file
    • builder

      static CommentedFileConfigBuilder builder(Path file)
      Returns a CommentedFileConfigBuilder to create a CommentedFileConfig with many options. The format is detected automatically.
      Parameters:
      file - the file to use to save and load the config
      Returns:
      a new FileConfigBuilder that will build a CommentedFileConfig associated to the specified file
      Throws:
      NoFormatFoundException - if the format detection fails
    • builder

      static CommentedFileConfigBuilder builder(String filePath)
      Returns a CommentedFileConfigBuilder to create a CommentedFileConfig with many options. The format is detected automatically.
      Parameters:
      filePath - the file's path
      Returns:
      a new FileConfigBuilder that will build a CommentedFileConfig associated to the specified file
      Throws:
      NoFormatFoundException - if the format detection fails
    • builder

      static CommentedFileConfigBuilder builder(String filePath, ConfigFormat<? extends CommentedConfig> format)
      Returns a CommentedFileConfigBuilder to create a CommentedFileConfig with many options.
      Parameters:
      filePath - the file's path
      format - the config's format
      Returns:
      a new FileConfigBuilder that will build a CommentedFileConfig associated to the specified file