public final class DumpSettingsBuilder extends Object
Constructor and Description |
---|
DumpSettingsBuilder()
Create builder
|
Modifier and Type | Method and Description |
---|---|
DumpSettings |
build()
Create immutable DumpSettings
|
DumpSettingsBuilder |
setAnchorGenerator(AnchorGenerator anchorGenerator)
Define anchor name generator (by default 'id' + number)
|
DumpSettingsBuilder |
setBestLineBreak(String bestLineBreak)
If the YAML is created for another platform (for instance on Windows to be consumed under Linux) than
this setting is used to define the line ending.
|
DumpSettingsBuilder |
setCanonical(boolean canonical)
Enforce canonical representation
|
DumpSettingsBuilder |
setDefaultFlowStyle(FlowStyle defaultFlowStyle)
Define flow style
|
DumpSettingsBuilder |
setDefaultScalarStyle(ScalarStyle defaultScalarStyle)
Define default scalar style
|
DumpSettingsBuilder |
setExplicitEnd(boolean explicitEnd)
Add '...' in the end of the document
|
DumpSettingsBuilder |
setExplicitRootTag(Optional<Tag> explicitRootTag)
Define root
Tag or let the tag to be detected automatically |
DumpSettingsBuilder |
setExplicitStart(boolean explicitStart)
Add '---' in the beginning of the document
|
DumpSettingsBuilder |
setIndent(int indent)
Define the amount of the spaces for the indent in the block flow style.
|
DumpSettingsBuilder |
setIndicatorIndent(int indicatorIndent)
Default is 0.
|
DumpSettingsBuilder |
setMultiLineFlow(boolean multiLineFlow)
Use pretty flow style when every value in the flow context gets a separate line.
|
DumpSettingsBuilder |
setScalarResolver(ScalarResolver scalarResolver)
Define
ScalarResolver or use JSON resolver by default |
DumpSettingsBuilder |
setSplitLines(boolean splitLines)
Define whether to split long lines
|
DumpSettingsBuilder |
setTagDirective(Map<String,String> tagDirective)
Add TAG directive (http://yaml.org/spec/1.2/spec.html#id2782090)
|
DumpSettingsBuilder |
setUseUnicodeEncoding(boolean useUnicodeEncoding)
Define whether Unicode char or escape sequence starting with '\\u'
|
DumpSettingsBuilder |
setWidth(int width)
Set max width for literal scalars.
|
DumpSettingsBuilder |
setYamlDirective(Optional<SpecVersion> yamlDirective)
Add YAML directive (http://yaml.org/spec/1.2/spec.html#id2781553)
|
public DumpSettingsBuilder setDefaultFlowStyle(FlowStyle defaultFlowStyle)
defaultFlowStyle
- - specify the stylepublic DumpSettingsBuilder setDefaultScalarStyle(ScalarStyle defaultScalarStyle)
defaultScalarStyle
- - specify the scalar stylepublic DumpSettingsBuilder setExplicitStart(boolean explicitStart)
explicitStart
- - true if the document start must be explicitly indicatedpublic DumpSettingsBuilder setAnchorGenerator(AnchorGenerator anchorGenerator)
anchorGenerator
- - specified function to create anchor namespublic DumpSettingsBuilder setScalarResolver(ScalarResolver scalarResolver)
ScalarResolver
or use JSON resolver by defaultscalarResolver
- - specify the scalar resolverpublic DumpSettingsBuilder setExplicitRootTag(Optional<Tag> explicitRootTag)
Tag
or let the tag to be detected automaticallyexplicitRootTag
- - specify the root tagpublic DumpSettingsBuilder setExplicitEnd(boolean explicitEnd)
explicitEnd
- - true if the document end must be explicitly indicatedpublic DumpSettingsBuilder setYamlDirective(Optional<SpecVersion> yamlDirective)
yamlDirective
- - the version to be used in the directivepublic DumpSettingsBuilder setTagDirective(Map<String,String> tagDirective)
tagDirective
- - the data to create TAG directivepublic DumpSettingsBuilder setCanonical(boolean canonical)
canonical
- - specify if the canonical representation must be usedpublic DumpSettingsBuilder setMultiLineFlow(boolean multiLineFlow)
multiLineFlow
- - set false to output all values in a single line.public DumpSettingsBuilder setUseUnicodeEncoding(boolean useUnicodeEncoding)
useUnicodeEncoding
- - true to use Unicode for "�", false to use "�" for the same charpublic DumpSettingsBuilder setIndent(int indent)
indent
- - the number of spaces. Must be within the range com.hazelcast.org.snakeyaml.engine.v1.emitter.Emitter.MIN_INDENT
and com.hazelcast.org.snakeyaml.engine.v1.emitter.Emitter.MAX_INDENTpublic DumpSettingsBuilder setIndicatorIndent(int indicatorIndent)
indicatorIndent
- - must be non-negative and less than com.hazelcast.org.snakeyaml.engine.v1.emitter.Emitter.MAX_INDENT - 1public DumpSettingsBuilder setWidth(int width)
width
- - the widthpublic DumpSettingsBuilder setBestLineBreak(String bestLineBreak)
bestLineBreak
- - "\r\n" or "\n"public DumpSettingsBuilder setSplitLines(boolean splitLines)
splitLines
- - true to split long linespublic DumpSettings build()
Copyright © 2019 Hazelcast, Inc.. All rights reserved.