Class ConfigurationOptions
- Direct Known Subclasses:
MemoryConfigurationOptions
Synchronized with the commit on 13-March-2019.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic final char -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConfigurationOptions(@NotNull Configuration configuration) Constructs a set of configuration options. -
Method Summary
Modifier and TypeMethodDescription@NotNull ConfigurationGets the configuration that these options controls.final booleanChecks if the configuration should copy values from its default configuration directly.final charGets thecharthat will be used to separate configuration sections.@NotNull ConfigurationOptionssetCopyDefaults(boolean copyDefaults) Sets if the configuration should copy values from its default configuration directly.@NotNull ConfigurationOptionssetPathSeparator(char pathSeparator) Sets thecharthat will be used to separate configuration sections.
-
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
Constructs a set of configuration options.- Parameters:
configuration- The configuration to create the options for.
-
-
Method Details
-
getConfiguration
Gets the configuration that these options controls.- Returns:
- The configuration that these options controls.
-
getPathSeparator
public final char getPathSeparator()Gets thecharthat 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
charused to separate configuration sections.
-
setPathSeparator
Sets thecharthat 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- Thecharused 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 asConfigurationSection.isSet(String).The default value is
false.- Returns:
trueif the default values should be copied,falseotherwise.
-
setCopyDefaults
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 asConfigurationSection.isSet(String).The default value is
false.- Parameters:
copyDefaults-trueif the default values should be copied,falseotherwise.- Returns:
- These options, for chaining.
-