Interface CommentedFileConfig

    • Method Detail

      • 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​(java.io.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​(java.io.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​(java.nio.file.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​(java.nio.file.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​(java.lang.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​(java.lang.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​(java.io.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​(java.io.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​(java.nio.file.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​(java.nio.file.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​(java.lang.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​(java.lang.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​(java.io.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​(java.io.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​(java.nio.file.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​(java.nio.file.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​(java.lang.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​(java.lang.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