Enum Class YamlWriter.StringStyle
java.lang.Object
java.lang.Enum<YamlWriter.StringStyle>
net.elytrium.serializer.language.writer.YamlWriter.StringStyle
- All Implemented Interfaces:
Serializable,Comparable<YamlWriter.StringStyle>,Constable
- Enclosing class:
- YamlWriter
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPreferably single line, line separator will be escaped, quoted with double quote".Preferably single line, line separators will make new lines, quoted with double quote".Preferably multi line, quoted with>, new lines will be replaced with spaces, single new line at the end will be kept, but>-will be used if new lines were found at the end of the string, and>+will be used if multiple new lines were found at the end of the string.Preferably multi line, quoted with>+, new lines will be replaced with spaces, all new lines from end will be kept, but>-will be used if new lines were found at the end of the string.Preferably multi line, quoted with>-, new lines will be replaced with spaces, can't contain new lines at the end.Preferably multi line, quoted with|, single new line at the end will be kept, but|-will be used if no new lines were found at the end of the string.Preferably multi line, quoted with|+, all new lines from end will be kept, but|-will be used if no new lines were found at the end of the string.Preferably multi line, quoted with|, can't contain new lines at the end.Only single line, not quoted, but"will be used if special character was foundPreferably single line, quoted with single quote', but"will be used if special character was found -
Method Summary
Modifier and TypeMethodDescriptionstatic YamlWriter.StringStyleReturns the enum constant of this class with the specified name.static YamlWriter.StringStyle[]values()Returns an array containing the constants of this enum class, in the order they are declared.voidwrite(YamlWriter writer, String string)
-
Enum Constant Details
-
NOT_QUOTED
Only single line, not quoted, but"will be used if special character was found -
SINGLE_QUOTED
Preferably single line, quoted with single quote', but"will be used if special character was found -
DOUBLE_QUOTED
Preferably single line, line separator will be escaped, quoted with double quote". -
DOUBLE_QUOTED_MULTILINE
Preferably single line, line separators will make new lines, quoted with double quote". -
MULTILINE_FOLDED_AUTO_CLIPPED
Preferably multi line, quoted with>, new lines will be replaced with spaces, single new line at the end will be kept, but>-will be used if new lines were found at the end of the string, and>+will be used if multiple new lines were found at the end of the string. -
MULTILINE_FOLDED_STRIPPED
Preferably multi line, quoted with>-, new lines will be replaced with spaces, can't contain new lines at the end. Throws an exception if new line caught at the end. -
MULTILINE_FOLDED_AUTO_KEPT
Preferably multi line, quoted with>+, new lines will be replaced with spaces, all new lines from end will be kept, but>-will be used if new lines were found at the end of the string. -
MULTILINE_LITERAL_AUTO_CLIPPED
Preferably multi line, quoted with|, single new line at the end will be kept, but|-will be used if no new lines were found at the end of the string. -
MULTILINE_LITERAL_STRIPPED
Preferably multi line, quoted with|, can't contain new lines at the end. Throws an exception if new line caught at the end. -
MULTILINE_LITERAL_AUTO_KEPT
Preferably multi line, quoted with|+, all new lines from end will be kept, but|-will be used if no new lines were found at the end of the string.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
write
-