Enum Class Direction

java.lang.Object
java.lang.Enum<Direction>
dev.jcputney.mjml.Direction
All Implemented Interfaces:
Serializable, Comparable<Direction>, Constable

public enum Direction extends Enum<Direction>
Text direction for the HTML document.
  • Enum Constant Details

    • LTR

      public static final Direction LTR
      Left-to-right text direction.
    • RTL

      public static final Direction RTL
      Right-to-left text direction.
    • AUTO

      public static final Direction AUTO
      Automatic text direction determined by the browser.
  • Method Details

    • values

      public static Direction[] 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 Direction 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
    • of

      public static Direction of(String direction)
      Parses a direction string (case-insensitive).
      Parameters:
      direction - the direction string ("ltr", "rtl", or "auto")
      Returns:
      the corresponding Direction enum value
      Throws:
      IllegalArgumentException - if the string is not a valid direction
    • value

      public String value()
      Returns the lowercase string representation used in HTML output.
      Returns:
      the lowercase direction string (e.g. "ltr", "rtl", "auto")
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Direction>