Enum BlankLineStyle

java.lang.Object
java.lang.Enum<BlankLineStyle>
org.spongepowered.configurate.yaml.BlankLineStyle
All Implemented Interfaces:
Serializable, Comparable<BlankLineStyle>

public enum BlankLineStyle extends Enum<BlankLineStyle>
Representation of blank lines in a YAML document.
Since:
4.3.0
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Add a blank line after a nested node.

    Example:
    Prepend a blank line before every node with a comment, except from the first child.

    Example:
    Keep the blank lines just like they were read.

    Note that this option, unlike the others, will also keep read blank lines (and store it in the comment.) These blank lines are stored using a special character, so if you write to a different format you may have to remove them manually.
    Don't do any blank line styling.
    Add a blank after every root child, except the last.

    Example:
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • NONE

      public static final BlankLineStyle NONE
      Don't do any blank line styling. This includes seeing blank lines during read as formatting, which will be stripped. To keep those blank lines, use the KEEP style.

      This is the default.

      Example:
       
        a: 1
        b:
          c: 1
        e:
          - hello
          - world
        f:
          - name: hello
          - name: world
        g:
          h:
            - name: hello
            - name: world
          i: 1
        j: 1
       
      Since:
      4.3.0
    • KEEP

      public static final BlankLineStyle KEEP
      Keep the blank lines just like they were read.

      Note that this option, unlike the others, will also keep read blank lines (and store it in the comment.) These blank lines are stored using a special character, so if you write to a different format you may have to remove them manually.
      Since:
      4.3.0
    • AFTER_NESTED

      public static final BlankLineStyle AFTER_NESTED
      Add a blank line after a nested node.

      Example:
       
        a: 1
        b:
          c: 1
      
        e:
          - hello
          - world
      
        f:
          - name: hello
          - name: world
      
        g:
          h:
            - name: hello
            - name: world
      
          i: 1
      
        j: 1
       
      Since:
      4.3.0
    • ROOT_CHILDREN

      public static final BlankLineStyle ROOT_CHILDREN
      Add a blank after every root child, except the last.

      Example:
       
        a: 1
      
        b:
          c: 1
      
        e:
          - hello
          - world
      
        f:
          - name: hello
          - name: world
      
        g:
          h:
            - name: hello
            - name: world
          i: 1
      
        j: 1
       
      Since:
      4.3.0
    • BEFORE_COMMENT

      public static final BlankLineStyle BEFORE_COMMENT
      Prepend a blank line before every node with a comment, except from the first child.

      Example:
       
        # Hello
        a: 1
      
        # World
        b:
          # John
          c: 1
      
        # Doe
        e:
          - hello
          - world
      
        # Jane
        f:
          - name: hello
          - name: world
      
        # Doe
        g:
          # Lorum
          h:
            - name: hello
            - name: world
      
          # Ipsum
          i: 1
        j: 1
       
      Since:
      4.3.0
  • Method Details

    • values

      public static BlankLineStyle[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static BlankLineStyle valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null