- java.lang.Object
-
- xyz.tozymc.configuration.builder.AbstractConfigBuilder<T>
-
- xyz.tozymc.configuration.file.builder.AbstractFileConfigBuilder<YamlConfig>
-
- xyz.tozymc.configuration.yaml.builder.YamlConfigBuilder
-
public class YamlConfigBuilder extends xyz.tozymc.configuration.file.builder.AbstractFileConfigBuilder<YamlConfig>
Builder class to create a newYamlConfig.- Since:
- 1.0
- See Also:
YamlConfig,YamlConfigOptions
-
-
Constructor Summary
Constructors Constructor Description YamlConfigBuilder(Path configPath)Constructs new file configuration builder with configPath.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected YamlConfigbuildConfig()org.yaml.snakeyaml.DumperOptions.FlowStyleflowStyle()Gets flow style for YAML document, default isDumperOptions.FlowStyle.BLOCK.@NotNull YamlConfigBuilderflowStyle(org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle)Sets flow style for YAML document, default isDumperOptions.FlowStyle.BLOCK.intindent()Gets the indent of between parent and child element.@NotNull YamlConfigBuilderindent(int indent)Sets the indent of between parent and child element.booleanprettyFlow()Checks if YAML document using pretty flow style.@NotNull YamlConfigBuilderprettyFlow(boolean prettyFlow)Force the emitter to produce a pretty YAML document when using the flow style.-
Methods inherited from class xyz.tozymc.configuration.file.builder.AbstractFileConfigBuilder
configPath, createConfig, defaultResource, defaultStream, defaultStream, reloadType, reloadType
-
-
-
-
Method Detail
-
indent
public int indent()
Gets the indent of between parent and child element.- Returns:
- The indent of between parent and child element.
-
indent
@NotNull public @NotNull YamlConfigBuilder indent(int indent)
Sets the indent of between parent and child element.- Parameters:
indent- indent of between parent and child element.- Returns:
- This builder, for chaining.
-
prettyFlow
public boolean prettyFlow()
Checks if YAML document using pretty flow style.- Returns:
- True if YAML document using pretty flow style.
-
prettyFlow
@NotNull public @NotNull YamlConfigBuilder prettyFlow(boolean prettyFlow)
Force the emitter to produce a pretty YAML document when using the flow style.- Parameters:
prettyFlow- True produce pretty flow YAML document.- Returns:
- This builder, for chaining.
-
flowStyle
public org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle()
Gets flow style for YAML document, default isDumperOptions.FlowStyle.BLOCK.- Returns:
- Flow style for YAML document.
-
flowStyle
@NotNull public @NotNull YamlConfigBuilder flowStyle(org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle)
Sets flow style for YAML document, default isDumperOptions.FlowStyle.BLOCK.- Parameters:
flowStyle- Flow style for YAML document.- Returns:
- This build, for chaining.
-
buildConfig
protected YamlConfig buildConfig()
- Specified by:
buildConfigin classxyz.tozymc.configuration.file.builder.AbstractFileConfigBuilder<YamlConfig>
-
-