YamlConfig.Builder
| Type | 🔵 Subclass of YamlConfig.java |
| Package | io.github.mrtesz.teszcore.config |
| GitHub | YamlConfig.java |
| Implements | Copyable<YamlConfig.Builder> |
Description
Builder class of the YamlConfig
Building
Create a new YamlConfig.Builder instance with YamlConfig#builder()
Methods
build
YamlConfig build();
Build the YamlConfig instance, previously configured
Returns: YamlConfig — the YamlConfig, previously configured
Throws: NullPointerException when fileName is not set or null Throws: NullPointerException when dumperOptions is null
copy
implemented from Copyable
T: YamlConfig.Builder
Builder Values
| Value | Type | Annotations | Default | Description |
|---|---|---|---|---|
filePath | String | @Nullable | null | The path, the YAML file will be created in |
fileName | String | @NotNull | - | The name, the YAML file will be created with |
autosave | boolean | - | true | Should the config should be saved automatically in set() |
dumperOptions | DumperOptions | @NotNull | new DumperOptions() | The Dumper Options, the YAML file will be created with |
defaultStyle | DumperOptions.ScalarStyle | @NotNull | DumperOptions.ScalarStyle.PLAIN | defaultStyle of the DumperOptions |
defaultFlowStyle | DumperOptions.FlowStyle | @NotNull | DumperOptions.FlowStyle.AUTO | defaultFlowStyle of the DumperOptions |
lineBreak | DumperOptions.LineBreak | @NotNull | DumperOptions.LineBreak.UNIX | lineBreak of the DumperOptions |
nonPrintableStyle | DumperOptions.NonPrintableStyle | - | DumperOptions.NonPrintableStyle.BINARY | nonPrintableStyle of the DumperOptions |
anchorGenerator | AnchorGenerator | - | new NumberAnchorGenerator(0) | anchorGenerator of the DumperOptions |
version | DumperOptions.Version | @Nullable | null | version of the DumperOptions |
timeZone | TimeZone | @Nullable | null | timeZone of the DumperOptions |
canonical | boolean | - | false | canonical of the DumperOptions |
allowUnicode | boolean | - | true | allowUnicode of the DumperOptions |
indent | int | - | 2 | indent of the DumperOptions |
indicatorIndent | int | - | 0 | indicatorIndent of the DumperOptions |
indentWithIndicator | boolean | - | false | indentWithIndicator of the DumperOptions |
width | int | - | 80 | bestWidth of the DumperOptions |
splitLines | boolean | - | true | splitLines of the DumperOptions |
explicitStart | boolean | - | false | explicitStart of the DumperOptions |
explicitEnd | boolean | @NotNull | false | explicitEnd of the DumperOptions |
maxSimpleKeyLength | int | - | 128 | maxSimpleKeyLength of the DumperOptions |
processComments | boolean | - | false | processComments of the DumperOptions |
tags | Map<String, String> | @Nullable | null | tags of the DumperOptions |
prettyFlow | Boolean | - | false | prettyFlow of the DumperOptions |
For further information about DumperOptions values, see DumperOptions Javadoc or the SnakeYAML Source.