Class YamlFormat.Builder
- Enclosing class:
- YamlFormat
YamlFormat.-
Method Summary
Modifier and TypeMethodDescription@NotNull YamlFormat.BuilderarrayFlowStyle(org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle) SetsDumperOptions.FlowStylefor arrays.@NotNull YamlFormatbuild()BuildsYamlFormat.@NotNull YamlFormat.BuilderflowStyle(org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle) SetsDumperOptions.FlowStyle.@NotNull YamlFormat.Builderindent(int indent) Sets number of spaces as indentation.@NotNull YamlFormat.BuildermapFlowStyle(org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle) SetsDumperOptions.FlowStylefor maps.@NotNull YamlFormat.BuilderprocessComment(boolean processComment) Sets whether to process comments.@NotNull YamlFormat.BuilderscalarStyle(org.yaml.snakeyaml.DumperOptions.ScalarStyle scalarStyle) SetsDumperOptions.ScalarStyle.@NotNull YamlFormat.BuildersequenceFlowStyle(org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle) SetsDumperOptions.FlowStylefor sequences.
-
Method Details
-
flowStyle
@Contract("_ -> this") @NotNull public @NotNull YamlFormat.Builder flowStyle(@Nullable org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle) SetsDumperOptions.FlowStyle.Passing
nullto set the default style (DumperOptions.FlowStyle.BLOCK.- Parameters:
flowStyle-DumperOptions.FlowStyleor null to set the default style- Returns:
- this
YamlFormat.Builderinstance
-
arrayFlowStyle
@Contract("_ -> this") @NotNull public @NotNull YamlFormat.Builder arrayFlowStyle(@Nullable org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle) SetsDumperOptions.FlowStylefor arrays.Passing
nullto set the default style (DumperOptions.FlowStyle.FLOW.This style is only applied when the root style (set by
flowStyle(DumperOptions.FlowStyle)isDumperOptions.FlowStyle.BLOCK- Parameters:
flowStyle-DumperOptions.FlowStyleor null to set the default style- Returns:
- this
YamlFormat.Builderinstance
-
sequenceFlowStyle
@Contract("_ -> this") @NotNull public @NotNull YamlFormat.Builder sequenceFlowStyle(@Nullable org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle) SetsDumperOptions.FlowStylefor sequences.Passing
nullto set the default style (DumperOptions.FlowStyle.BLOCK.This style is only applied when the root style (set by
flowStyle(DumperOptions.FlowStyle)isDumperOptions.FlowStyle.BLOCK- Parameters:
flowStyle-DumperOptions.FlowStyleor null to set the default style- Returns:
- this
YamlFormat.Builderinstance
-
mapFlowStyle
@Contract("_ -> this") @NotNull public @NotNull YamlFormat.Builder mapFlowStyle(@Nullable org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle) SetsDumperOptions.FlowStylefor maps.Passing
nullto set the default style (DumperOptions.FlowStyle.BLOCK.This style is only applied when the root style (set by
flowStyle(DumperOptions.FlowStyle)isDumperOptions.FlowStyle.BLOCK- Parameters:
flowStyle-DumperOptions.FlowStyleor null to set the default style- Returns:
- this
YamlFormat.Builderinstance
-
scalarStyle
@Contract("_ -> this") @NotNull public @NotNull YamlFormat.Builder scalarStyle(@Nullable org.yaml.snakeyaml.DumperOptions.ScalarStyle scalarStyle) SetsDumperOptions.ScalarStyle.Passing
nullto set the default style (DumperOptions.ScalarStyle.PLAIN.- Parameters:
scalarStyle-DumperOptions.ScalarStyleor null to set the default style- Returns:
- this
YamlFormat.Builderinstance
-
indent
Sets number of spaces as indentation.Passing 0 or negative value to set the default indent (2).
- Parameters:
indent- number of spaces or 0/negative value to set default value- Returns:
- this
YamlFormat.Builderinstance
-
processComment
@Contract("_ -> this") @NotNull public @NotNull YamlFormat.Builder processComment(boolean processComment) Sets whether to process comments.Node that the comments will be processed when
flowStyle(DumperOptions.FlowStyle)isDumperOptions.FlowStyle.BLOCK- Parameters:
processComment-trueto process comments,falseto ignore comments- Returns:
- this
YamlFormat.Builderinstance
-
build
BuildsYamlFormat.- Returns:
- a created
YamlFormat
-