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

## Class LoadSettingsBuilder

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

-     public final class LoadSettingsBuilder
      extends Object

  Builder pattern implementation for LoadSettings

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LoadSettingsBuilder()` Create builder

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `LoadSettings` | `build()` Build immutable LoadSettings
    `LoadSettingsBuilder` | `setAllowDuplicateKeys(boolean allowDuplicateKeys)` YAML 1.2 does require unique keys.
    `LoadSettingsBuilder` | `setBufferSize(Integer bufferSize)` Buffer size for incoming data stream.
    `LoadSettingsBuilder` | `setDefaultList(Function<Integer,List> defaultList)` Provide default List implementation.
    `LoadSettingsBuilder` | `setDefaultMap(Function<Integer,Map> defaultMap)` Provide default Map implementation.
    `LoadSettingsBuilder` | `setDefaultSet(Function<Integer,Set> defaultSet)` Provide default Set implementation.
    `LoadSettingsBuilder` | `setLabel(String label)` Label for the input data.
    `LoadSettingsBuilder` | `setRootConstructNode(Optional<ConstructNode> rootConstructNode)` Provide the factory to create Nodes.
    `LoadSettingsBuilder` | `setScalarResolver(ScalarResolver scalarResolver)` Provide resolver to detect a tag by the value of a scalar
    `LoadSettingsBuilder` | `setTagConstructors(Map<Tag,ConstructNode> tagConstructors)` Provide constructors for the specified tags.
    `LoadSettingsBuilder` | `setUseMarks(boolean useMarks)` Marks are only used for error messages.
    `LoadSettingsBuilder` | `setVersionFunction(Function<SpecVersion,SpecVersion> versionFunction)` Manage YAML directive value which defines the version of the YAML specification.

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

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

- - ### Constructor Detail

    - #### LoadSettingsBuilder

          public LoadSettingsBuilder()

      Create builder

  - ### Method Detail

    - #### setLabel

          public LoadSettingsBuilder setLabel(String label)

      Label for the input data. Can be used to improve the error message.
      Parameters:
        `label` - - meaningful label to indicate the input source
      Returns:
        the builder with the provided value

    - #### setRootConstructNode

          public LoadSettingsBuilder setRootConstructNode(Optional<ConstructNode> rootConstructNode)

      Provide the factory to create Nodes.
      Parameters:
        `rootConstructNode` - - provided factory to create the root Node
      Returns:
        the builder with the provided value

    - #### setTagConstructors

          public LoadSettingsBuilder setTagConstructors(Map<Tag,ConstructNode> tagConstructors)

      Provide constructors for the specified tags.
      Parameters:
        `tagConstructors` - - the map from a Tag to its constructor
      Returns:
        the builder with the provided value

    - #### setScalarResolver

          public LoadSettingsBuilder setScalarResolver(ScalarResolver scalarResolver)

      Provide resolver to detect a tag by the value of a scalar
      Parameters:
        `scalarResolver` - - specified ScalarResolver
      Returns:
        the builder with the provided value

    - #### setDefaultList

          public LoadSettingsBuilder setDefaultList(Function<Integer,List> defaultList)

      Provide default List implementation. `ArrayList` is used if nothing provided.
      Parameters:
        `defaultList` - - specified List implementation
      Returns:
        the builder with the provided value

    - #### setDefaultSet

          public LoadSettingsBuilder setDefaultSet(Function<Integer,Set> defaultSet)

      Provide default Set implementation. `LinkedHashSet` is used if nothing provided.
      Parameters:
        `defaultSet` - - specified Set implementation
      Returns:
        the builder with the provided value

    - #### setDefaultMap

          public LoadSettingsBuilder setDefaultMap(Function<Integer,Map> defaultMap)

      Provide default Map implementation. `LinkedHashMap` is used if nothing provided.
      Parameters:
        `defaultMap` - - specified Map implementation
      Returns:
        the builder with the provided value

    - #### setBufferSize

          public LoadSettingsBuilder setBufferSize(Integer bufferSize)

      Buffer size for incoming data stream. If the incoming stream is already bufferred, then changing the buffer does not improve the performance
      Parameters:
        `bufferSize` - - buffer size (in bytes) for input data
      Returns:
        the builder with the provided value

    - #### setAllowDuplicateKeys

          public LoadSettingsBuilder setAllowDuplicateKeys(boolean allowDuplicateKeys)

      YAML 1.2 does require unique keys. To support the backwards compatibility it is possible to select what should happend when non-unique keys are detected.
      Parameters:
        `allowDuplicateKeys` - - if true than the non-unique keys in a mapping are allowed (last key wins). False by default.
      Returns:
        the builder with the provided value

    - #### setUseMarks

          public LoadSettingsBuilder setUseMarks(boolean useMarks)

      Marks are only used for error messages. But they requires a lot of memory. True by default.
      Parameters:
        `useMarks` - - use false to save resources but use less informative error messages (no line and context)
      Returns:
        the builder with the provided value

    - #### setVersionFunction

          public LoadSettingsBuilder setVersionFunction(Function<SpecVersion,SpecVersion> versionFunction)

      Manage YAML directive value which defines the version of the YAML specification. This parser supports YAML 1.2 but it can parse most of YAML 1.1 and YAML 1.0 This function allows to control the version management. For instance if the document contains old version the parser can be adapted to compensate the problem. Or it can fail to indicate that the incoming version is not supported.
      Parameters:
        `versionFunction` - - define the way to manage the YAML version. By default, 1.* versions are accepted and treated as YAML 1.2. Other versions fail to parse (YamlVersionException is thown)
      Returns:
        the builder with the provided value

    - #### build

          public LoadSettings build()

      Build immutable LoadSettings
      Returns:
        immutable LoadSettings

Copyright © 2019. All rights reserved.