Top Description Fields Constructors Methods
org.snakeyaml.engine.v2.common

public final Enum ScalarStyle

extends Enum<ScalarStyle>
Class Inheritance
Imports
java.util.Optional

YAML provides a rich set of scalar styles. Block scalar styles include the literal style and the folded style; flow scalar styles include the plain style and two quoted styles, the single-quoted style and the double-quoted style. These styles offer a range of trade-offs between expressive power and readability.

Field Summary

Modifier and TypeField and Description
public static final ScalarStyle
DOUBLE_QUOTED

Double quoted scalar

public static final ScalarStyle
FOLDED

Folded scalar

public static final ScalarStyle
JSON_SCALAR_STYLE

Mixture of scalar styles to dump JSON format.

public static final ScalarStyle
LITERAL

Literal scalar

public static final ScalarStyle
PLAIN

Plain scalar

public static final ScalarStyle
SINGLE_QUOTED

Single quoted scalar

private final Optional<Character>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration.

public static ScalarStyle
public static ScalarStyle[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

DOUBLE_QUOTEDback to summary
public static final ScalarStyle DOUBLE_QUOTED

Double quoted scalar

FOLDEDback to summary
public static final ScalarStyle FOLDED

Folded scalar

JSON_SCALAR_STYLEback to summary
public static final ScalarStyle JSON_SCALAR_STYLE

Mixture of scalar styles to dump JSON format. Double-quoted style for !!str, !!binary, !!timestamp. Plain style - for !!bool, !!float, !!int, !!null These are never dumped - !!merge, !!value, !!yaml

LITERALback to summary
public static final ScalarStyle LITERAL

Literal scalar

PLAINback to summary
public static final ScalarStyle PLAIN

Plain scalar

SINGLE_QUOTEDback to summary
public static final ScalarStyle SINGLE_QUOTED

Single quoted scalar

styleOptback to summary
private final Optional<Character> styleOpt

Constructor Detail

ScalarStyleback to summary
private ScalarStyle(Optional<Character> style)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Enum.toString.

Doc from java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists.

Annotations
@Override
valueOfback to summary
public static ScalarStyle valueOf(String name)
valuesback to summary
public static ScalarStyle[] values()