Enum BlankLineStyle
- All Implemented Interfaces:
Serializable,Comparable<BlankLineStyle>
Representation of blank lines in a YAML document.
- Since:
- 4.3.0
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAdd 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 TypeMethodDescriptionstatic BlankLineStyleReturns the enum constant of this type with the specified name.static BlankLineStyle[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
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 theKEEPstyle.
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
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
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
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
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
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
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 nameNullPointerException- if the argument is null
-