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

public static enum YamlWriter.StringStyle extends Enum<YamlWriter.StringStyle>
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Preferably 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 found
    Preferably single line, quoted with single quote ', but " will be used if special character was found
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.
    void
    write(YamlWriter writer, String string)
     

    Methods inherited from class java.lang.Object

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

    • NOT_QUOTED

      public static final YamlWriter.StringStyle NOT_QUOTED
      Only single line, not quoted, but " will be used if special character was found
    • SINGLE_QUOTED

      public static final YamlWriter.StringStyle SINGLE_QUOTED
      Preferably single line, quoted with single quote ', but " will be used if special character was found
    • DOUBLE_QUOTED

      public static final YamlWriter.StringStyle DOUBLE_QUOTED
      Preferably single line, line separator will be escaped, quoted with double quote ".
    • DOUBLE_QUOTED_MULTILINE

      public static final YamlWriter.StringStyle DOUBLE_QUOTED_MULTILINE
      Preferably single line, line separators will make new lines, quoted with double quote ".
    • MULTILINE_FOLDED_AUTO_CLIPPED

      public static final YamlWriter.StringStyle 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

      public static final YamlWriter.StringStyle 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

      public static final YamlWriter.StringStyle 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

      public static final YamlWriter.StringStyle 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

      public static final YamlWriter.StringStyle 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

      public static final YamlWriter.StringStyle 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

      public static YamlWriter.StringStyle[] 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

      public static YamlWriter.StringStyle valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • write

      public void write(YamlWriter writer, String string)