Enum Class OrderMarkPolicy

java.lang.Object
java.lang.Enum<OrderMarkPolicy>
io.github.wasabithumb.jtoml.option.prop.OrderMarkPolicy
All Implemented Interfaces:
Serializable, Comparable<OrderMarkPolicy>, Constable

public enum OrderMarkPolicy extends Enum<OrderMarkPolicy>
Determines how the BOM (byte order mark) should be handled when reading and writing
  • Enum Constant Details

    • NEVER

      public static final OrderMarkPolicy NEVER
      • When reading: Never attempt to read a BOM (fail if one is present)
      • When writing: Never write a BOM
    • ALWAYS

      public static final OrderMarkPolicy ALWAYS
      • When reading: Always read a BOM (fail if one is not present)
      • When writing: Always write a BOM
    • IF_PRESENT

      public static final OrderMarkPolicy IF_PRESENT
      • When reading: Read a BOM only if one exists
      • When writing: Write a BOM only if the document was previously read and contained a BOM
  • Method Details

    • values

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