Class SnakeYamlOptions.Builder

java.lang.Object
space.arim.dazzleconf.ext.snakeyaml.SnakeYamlOptions.Builder
Enclosing class:
SnakeYamlOptions

public static class SnakeYamlOptions.Builder extends Object
Builder of SnakeYamlOptions
Author:
A248
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • yamlSupplier

      public SnakeYamlOptions.Builder yamlSupplier(Supplier<org.yaml.snakeyaml.Yaml> yamlSupplier)
      Sets the Yaml supplier for this builder to the specified one. The default is a supplier which returns a Yaml instance with block flow style.
      Parameters:
      yamlSupplier - the yaml supplier
      Returns:
      this builder
    • commentMode

      public SnakeYamlOptions.Builder commentMode(CommentMode commentMode)
      Sets the comment mode used for writing comments. The available modes are obtainable via static factory methods in CommentMode
      Parameters:
      commentMode - the comment mode to use
      Returns:
      this builder
    • useCommentingWriter

      @Deprecated public SnakeYamlOptions.Builder useCommentingWriter(boolean useCommentingWriter)
      Deprecated.
      Comments are now handled via the comment mode. Use commentMode(CommentMode) with CommentMode.alternativeWriter() to replace 'true' calls to this method.
      SnakeYaml does not support writing comments. This option enables an alternative yaml writer implementation which has the ability to write comments before each entry. False by default.

      With this option disabled, only the comment header on the top level configuration is written.
      Parameters:
      useCommentingWriter - true to use the commenting alternate writer, false otherwise
      Returns:
      this builder
    • charset

      public SnakeYamlOptions.Builder charset(Charset charset)
      Sets the character encoding used by the factory. Default is UTF 8
      Parameters:
      charset - the charset
      Returns:
      this builder
    • build

      public SnakeYamlOptions build()
      Builds the options. May be used repeatedly without side effects
      Returns:
      the built options
    • toString

      public String toString()
      Overrides:
      toString in class Object