Class YamlFormat.Builder
- Enclosing class:
YamlFormat
YamlFormat
.-
Method Summary
Modifier and TypeMethodDescriptionarrayFlowStyle
(org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle) SetsDumperOptions.FlowStyle
for arrays.build()
BuildsYamlFormat
.flowStyle
(org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle) SetsDumperOptions.FlowStyle
.indent
(int indent) Sets number of spaces as indentation.mapFlowStyle
(org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle) SetsDumperOptions.FlowStyle
for maps.processComment
(boolean processComment) Sets whether to process comments.scalarStyle
(org.yaml.snakeyaml.DumperOptions.ScalarStyle scalarStyle) SetsDumperOptions.ScalarStyle
.sequenceFlowStyle
(org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle) SetsDumperOptions.FlowStyle
for sequences.
-
Method Details
-
flowStyle
@Contract("_ -> this") public YamlFormat.Builder flowStyle(@Nullable org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle) SetsDumperOptions.FlowStyle
.Passing
null
to set the default style (DumperOptions.FlowStyle.BLOCK
.- Parameters:
flowStyle
-DumperOptions.FlowStyle
or null to set the default style- Returns:
- this
YamlFormat.Builder
instance
-
arrayFlowStyle
@Contract("_ -> this") public YamlFormat.Builder arrayFlowStyle(@Nullable org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle) SetsDumperOptions.FlowStyle
for arrays.Passing
null
to 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.FlowStyle
or null to set the default style- Returns:
- this
YamlFormat.Builder
instance
-
sequenceFlowStyle
@Contract("_ -> this") public YamlFormat.Builder sequenceFlowStyle(@Nullable org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle) SetsDumperOptions.FlowStyle
for sequences.Passing
null
to 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.FlowStyle
or null to set the default style- Returns:
- this
YamlFormat.Builder
instance
-
mapFlowStyle
@Contract("_ -> this") public YamlFormat.Builder mapFlowStyle(@Nullable org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle) SetsDumperOptions.FlowStyle
for maps.Passing
null
to 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.FlowStyle
or null to set the default style- Returns:
- this
YamlFormat.Builder
instance
-
scalarStyle
@Contract("_ -> this") public YamlFormat.Builder scalarStyle(@Nullable org.yaml.snakeyaml.DumperOptions.ScalarStyle scalarStyle) SetsDumperOptions.ScalarStyle
.Passing
null
to set the default style (DumperOptions.ScalarStyle.PLAIN
.- Parameters:
scalarStyle
-DumperOptions.ScalarStyle
or null to set the default style- Returns:
- this
YamlFormat.Builder
instance
-
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.Builder
instance
-
processComment
Sets whether to process comments.Node that the comments will be processed when
flowStyle(DumperOptions.FlowStyle)
isDumperOptions.FlowStyle.BLOCK
- Parameters:
processComment
-true
to process comments,false
to ignore comments- Returns:
- this
YamlFormat.Builder
instance
-
build
BuildsYamlFormat
.- Returns:
- a created
YamlFormat
-