java.lang.Object
java.lang.Enum<QuoteStyle>
org.simpleyaml.configuration.implementation.api.QuoteStyle
All Implemented Interfaces:
Serializable, Comparable<QuoteStyle>, java.lang.constant.Constable

public enum QuoteStyle extends Enum<QuoteStyle>
  • Enum Constant Details

    • SINGLE

      public static final QuoteStyle SINGLE
      Wrap values with single quotes.

      single: 'value'
    • DOUBLE

      public static final QuoteStyle DOUBLE
      Wrap values with double quotes.

      double: "value"
    • PLAIN

      public static final QuoteStyle PLAIN
      Default style, without quotes when possible.

      plain: value

      If value have characters that must be escaped then SINGLE quote style is used.

    • LITERAL

      public static final QuoteStyle LITERAL
       literal: |-
         Each line
         is literal
         and are joined with new lines
       
    • FOLDED

      public static final QuoteStyle FOLDED
       folded: >-
         Each line
         is literal
         and are joined with spaces
       
  • Method Details

    • values

      public static QuoteStyle[] 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 QuoteStyle 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