java.lang.Object
org.bspfsystems.yamlconfiguration.configuration.ConfigurationOptions
Direct Known Subclasses:
MemoryConfigurationOptions

public class ConfigurationOptions extends Object
Represents the various settings for controlling the input and output of a configuration.

Synchronized with the commit on 13-March-2019.

  • Field Details

    • DEFAULT_PATH_SEPARATOR

      public static final char DEFAULT_PATH_SEPARATOR
      See Also:
    • DEFAULT_COPY_DEFAULTS

      public static final boolean DEFAULT_COPY_DEFAULTS
      See Also:
  • Constructor Details

    • ConfigurationOptions

      protected ConfigurationOptions(@NotNull @NotNull Configuration configuration)
      Constructs a set of configuration options.
      Parameters:
      configuration - The configuration to create the options for.
  • Method Details

    • getConfiguration

      @NotNull public @NotNull Configuration getConfiguration()
      Gets the configuration that these options controls.
      Returns:
      The configuration that these options controls.
    • getPathSeparator

      public final char getPathSeparator()
      Gets the char that will be used to separate configuration sections.

      This value does not affect how the configuration is stored, only in how you access the data.

      The default value is ..

      Returns:
      The char used to separate configuration sections.
    • setPathSeparator

      @NotNull public @NotNull ConfigurationOptions setPathSeparator(char pathSeparator)
      Sets the char that will be used to separate configuration sections.

      This value does not affect how the configuration is stored, only in how you access the data.

      The default value is ..

      Parameters:
      pathSeparator - The char used to separate configuration sections.
      Returns:
      These options, for chaining.
    • getCopyDefaults

      public final boolean getCopyDefaults()
      Checks if the configuration should copy values from its default configuration directly.

      If this is true, all values in the default configuration will be directly copied, making it impossible to distinguish between values that were set and values that are provided by default. As a result, ConfigurationSection.contains(String) will always return the same value as ConfigurationSection.isSet(String).

      The default value is false.

      Returns:
      true if the default values should be copied, false otherwise.
    • setCopyDefaults

      @NotNull public @NotNull ConfigurationOptions setCopyDefaults(boolean copyDefaults)
      Sets if the configuration should copy values from its default configuration directly.

      If this is true, all values in the default configuration will be directly copied, making it impossible to distinguish between values that were set and values that are provided by default. As a result, ConfigurationSection.contains(String) will always return the same value as ConfigurationSection.isSet(String).

      The default value is false.

      Parameters:
      copyDefaults - true if the default values should be copied, false otherwise.
      Returns:
      These options, for chaining.