Class YamlConfigOptions


  • public class YamlConfigOptions
    extends xyz.tozymc.configuration.file.option.FileConfigOptions
    Various options for YamlConfig.
    Since:
    1.0
    • Constructor Detail

      • YamlConfigOptions

        public YamlConfigOptions​(@NotNull
                                 @NotNull xyz.tozymc.configuration.file.FileConfig config)
        Creates new YamlConfigOptions for YamlConfig.
        Parameters:
        config - Configuration that owned this options.
    • Method Detail

      • indent

        public int indent()
        Gets the indent of between parent and child element.
        Returns:
        The indent of between parent and child element.
      • indent

        @NotNull
        public @NotNull YamlConfigOptions indent​(int indent)
        Sets the indent of between parent and child element.
        Parameters:
        indent - indent of between parent and child element.
        Returns:
        This object, for chaining.
      • prettyFlow

        public boolean prettyFlow()
        Checks if YAML document using pretty flow style.
        Returns:
        True if YAML document using pretty flow style.
      • prettyFlow

        @NotNull
        public @NotNull YamlConfigOptions prettyFlow​(boolean prettyFlow)
        Force the emitter to produce a pretty YAML document when using the flow style.
        Parameters:
        prettyFlow - True produce pretty flow YAML document.
        Returns:
        This object, for chaining.
      • flowStyle

        public org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle()
        Gets flow style for YAML document, default is DumperOptions.FlowStyle.BLOCK.
        Returns:
        Flow style for YAML document.
      • flowStyle

        @NotNull
        public @NotNull YamlConfigOptions flowStyle​(org.yaml.snakeyaml.DumperOptions.FlowStyle flowStyle)
        Sets flow style for YAML document, default is DumperOptions.FlowStyle.BLOCK.
        Parameters:
        flowStyle - Flow style for YAML document.
        Returns:
        This object, for chaining.
      • dumperOptions

        @NotNull
        public @NotNull org.yaml.snakeyaml.DumperOptions dumperOptions()
      • config

        @NotNull
        public @NotNull YamlConfig config()
        Overrides:
        config in class xyz.tozymc.configuration.file.option.FileConfigOptions