com.hazelcast.org.snakeyaml.engine.v1.api

## Class DumpSettingsBuilder

- java.lang.Object
- - com.hazelcast.org.snakeyaml.engine.v1.api.DumpSettingsBuilder

-     public final class DumpSettingsBuilder
      extends Object

  Builder pattern implementation for DumpSettings

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DumpSettingsBuilder()` Create builder

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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)

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DumpSettingsBuilder

          public DumpSettingsBuilder()

      Create builder

  - ### Method Detail

    - #### setDefaultFlowStyle

          public DumpSettingsBuilder setDefaultFlowStyle(FlowStyle defaultFlowStyle)

      Define flow style
      Parameters:
        `defaultFlowStyle` - - specify the style
      Returns:
        the builder with the provided value

    - #### setDefaultScalarStyle

          public DumpSettingsBuilder setDefaultScalarStyle(ScalarStyle defaultScalarStyle)

      Define default scalar style
      Parameters:
        `defaultScalarStyle` - - specify the scalar style
      Returns:
        the builder with the provided value

    - #### setExplicitStart

          public DumpSettingsBuilder setExplicitStart(boolean explicitStart)

      Add '---' in the beginning of the document
      Parameters:
        `explicitStart` - - true if the document start must be explicitly indicated
      Returns:
        the builder with the provided value

    - #### setAnchorGenerator

          public DumpSettingsBuilder setAnchorGenerator(AnchorGenerator anchorGenerator)

      Define anchor name generator (by default 'id' + number)
      Parameters:
        `anchorGenerator` - - specified function to create anchor names
      Returns:
        the builder with the provided value

    - #### setScalarResolver

          public DumpSettingsBuilder setScalarResolver(ScalarResolver scalarResolver)

      Define `ScalarResolver` or use JSON resolver by default
      Parameters:
        `scalarResolver` - - specify the scalar resolver
      Returns:
        the builder with the provided value

    - #### setExplicitRootTag

          public DumpSettingsBuilder setExplicitRootTag(Optional<Tag> explicitRootTag)

      Define root `Tag` or let the tag to be detected automatically
      Parameters:
        `explicitRootTag` - - specify the root tag
      Returns:
        the builder with the provided value

    - #### setExplicitEnd

          public DumpSettingsBuilder setExplicitEnd(boolean explicitEnd)

      Add '...' in the end of the document
      Parameters:
        `explicitEnd` - - true if the document end must be explicitly indicated
      Returns:
        the builder with the provided value

    - #### setYamlDirective

          public DumpSettingsBuilder setYamlDirective(Optional<SpecVersion> yamlDirective)

      Add YAML directive (http://yaml.org/spec/1.2/spec.html#id2781553)
      Parameters:
        `yamlDirective` - - the version to be used in the directive
      Returns:
        the builder with the provided value

    - #### setTagDirective

          public DumpSettingsBuilder setTagDirective(Map<String,String> tagDirective)

      Add TAG directive (http://yaml.org/spec/1.2/spec.html#id2782090)
      Parameters:
        `tagDirective` - - the data to create TAG directive
      Returns:
        the builder with the provided value

    - #### setCanonical

          public DumpSettingsBuilder setCanonical(boolean canonical)

      Enforce canonical representation
      Parameters:
        `canonical` - - specify if the canonical representation must be used
      Returns:
        the builder with the provided value

    - #### setMultiLineFlow

          public DumpSettingsBuilder setMultiLineFlow(boolean multiLineFlow)

      Use pretty flow style when every value in the flow context gets a separate line.
      Parameters:
        `multiLineFlow` - - set false to output all values in a single line.
      Returns:
        the builder with the provided value

    - #### setUseUnicodeEncoding

          public DumpSettingsBuilder setUseUnicodeEncoding(boolean useUnicodeEncoding)

      Define whether Unicode char or escape sequence starting with '\\u'
      Parameters:
        `useUnicodeEncoding` - - true to use Unicode for "�", false to use "�" for the same char
      Returns:
        the builder with the provided value

    - #### setIndent

          public DumpSettingsBuilder setIndent(int indent)

      Define the amount of the spaces for the indent in the block flow style. Default is 2.
      Parameters:
        `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_INDENT
      Returns:
        the builder with the provided value

    - #### setIndicatorIndent

          public DumpSettingsBuilder setIndicatorIndent(int indicatorIndent)

      Default is 0.
      Parameters:
        `indicatorIndent` - - must be non-negative and less than com.hazelcast.org.snakeyaml.engine.v1.emitter.Emitter.MAX_INDENT - 1
      Returns:
        the builder with the provided value

    - #### setWidth

          public DumpSettingsBuilder setWidth(int width)

      Set max width for literal scalars. When the scalar representation takes more then the preferred with the scalar will be split into a few lines. The default is 80.
      Parameters:
        `width` - - the width
      Returns:
        the builder with the provided value

    - #### setBestLineBreak

          public 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. The platform line end is used by default.
      Parameters:
        `bestLineBreak` - - "\r\n" or "\n"
      Returns:
        the builder with the provided value

    - #### setSplitLines

          public DumpSettingsBuilder setSplitLines(boolean splitLines)

      Define whether to split long lines
      Parameters:
        `splitLines` - - true to split long lines
      Returns:
        the builder with the provided value

    - #### build

          public DumpSettings build()

      Create immutable DumpSettings
      Returns:
        DumpSettings with the provided values

Copyright © 2019. All rights reserved.