Class YamlConfigurationOptions
java.lang.Object
org.simpleyaml.configuration.ConfigurationOptions
org.simpleyaml.configuration.MemoryConfigurationOptions
org.simpleyaml.configuration.file.FileConfigurationOptions
org.simpleyaml.configuration.file.YamlConfigurationOptions
public class YamlConfigurationOptions
extends org.simpleyaml.configuration.file.FileConfigurationOptions
Various settings for controlling the input and output of a
YamlConfiguration- Author:
- Bukkit, Carleslc
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classOptions to configure the defaultQuoteStylefor each type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedYamlConfigurationOptions(YamlConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionGets the comment formatter used to format comments.commentFormatter(YamlCommentFormatter commentFormatter) Sets the comment formatter to be used to format comments.copyDefaults(boolean value) copyHeader(boolean value) booleaninthashCode()headerFormatter(org.simpleyaml.configuration.comments.format.CommentFormatter headerFormatter) indent(int value) Sets how much spaces should be used to indent each line.intGets how much spaces should be used to indent each list element, in addition to the line indent.indentList(int value) Sets how much spaces should be used to indent each list element, in addition to the line indent.pathSeparator(char value) Get the quote style default options.booleanIndicates if parsing comments is enabled.useComments(boolean useComments) Sets if parsing comments is needed.Methods inherited from class org.simpleyaml.configuration.file.FileConfigurationOptions
charset, copyHeader, header, isUnicodeMethods inherited from class org.simpleyaml.configuration.ConfigurationOptions
copyDefaults, indent, pathSeparator
-
Constructor Details
-
YamlConfigurationOptions
-
-
Method Details
-
configuration
- Overrides:
configurationin classorg.simpleyaml.configuration.file.FileConfigurationOptions
-
copyDefaults
- Overrides:
copyDefaultsin classorg.simpleyaml.configuration.file.FileConfigurationOptions
-
pathSeparator
- Overrides:
pathSeparatorin classorg.simpleyaml.configuration.file.FileConfigurationOptions
-
charset
- Overrides:
charsetin classorg.simpleyaml.configuration.file.FileConfigurationOptions
-
header
- Overrides:
headerin classorg.simpleyaml.configuration.file.FileConfigurationOptions
-
copyHeader
- Overrides:
copyHeaderin classorg.simpleyaml.configuration.file.FileConfigurationOptions
-
headerFormatter
public YamlConfigurationOptions headerFormatter(org.simpleyaml.configuration.comments.format.CommentFormatter headerFormatter) - Overrides:
headerFormatterin classorg.simpleyaml.configuration.file.FileConfigurationOptions
-
headerFormatter
- Overrides:
headerFormatterin classorg.simpleyaml.configuration.file.FileConfigurationOptions
-
indent
Sets how much spaces should be used to indent each line.The minimum value this may be is 2, and the maximum is 9.
- Overrides:
indentin classorg.simpleyaml.configuration.ConfigurationOptions- Parameters:
value- New indent- Returns:
- This object, for chaining
-
indentList
public int indentList()Gets how much spaces should be used to indent each list element, in addition to the line indent.- Returns:
- the list elements indentation
-
indentList
Sets how much spaces should be used to indent each list element, in addition to the line indent.The minimum value this may be is 0, and the maximum is the same as the
ConfigurationOptions.indent().- Parameters:
value- New list indentation- Returns:
- This object, for chaining
-
commentFormatter
Gets the comment formatter used to format comments. The default comment formatter isYamlCommentFormat.DEFAULT, which comment prefix is "# ", i.e. a # followed by a space.- Returns:
- the comment formatter
-
commentFormatter
Sets the comment formatter to be used to format comments. If unset, the default comment formatter prefix is "# ", i.e. a # followed by a space.- Parameters:
commentFormatter- the comment formatter to use- Returns:
- This object, for chaining
-
useComments
Sets if parsing comments is needed.If you don't use comments in your configuration file keep this disabled to improve parsing performance.
Default is false. WithYamlFileit is updated automatically when you load a file with comments or set new comments programmatically.- Parameters:
useComments- if parsing comments is needed- Returns:
- This object, for chaining
-
useComments
public boolean useComments()Indicates if parsing comments is enabled.If you don't use comments in your configuration file keep this disabled to improve parsing performance.
Default is false. WithYamlFileit is updated automatically when you load a file with comments or set new comments programmatically.- Returns:
- This object, for chaining
- See Also:
-
quoteStyleDefaults
Get the quote style default options. You can change the default quote style globally or for specific value types.- Returns:
- the quote style default options
- See Also:
-
equals
- Overrides:
equalsin classorg.simpleyaml.configuration.file.FileConfigurationOptions
-
hashCode
public int hashCode()- Overrides:
hashCodein classorg.simpleyaml.configuration.file.FileConfigurationOptions
-