Enum Class Display

java.lang.Object
java.lang.Enum<Display>
org.htmlcleaner.Display
All Implemented Interfaces:
Serializable, Comparable<Display>, Constable

public enum Display extends Enum<Display>
Most HTML 4 elements permitted within the BODY are classified as either block-level elements or inline elements. This enumeration contains corresponding constants to distinguish them.
  • Enum Constant Details

    • block

      public static final Display block
      Block-level elements typically contain inline elements and other block-level elements. When rendered visually, block-level elements usually begin on a new line.
    • inline

      public static final Display inline
      Inline elements typically may only contain text and other inline elements. When rendered visually, inline elements do not usually begin on a new line.
    • any

      public static final Display any
      The following elements may be used as either block-level elements or inline elements. If used as inline elements (e.g., within another inline element or a P), these elements should not contain any block-level elements.
    • none

      public static final Display none
      Elements that are not actually inline or block, usually such elements are not rendered at all.
  • Field Details

    • afterTagLineBreakNeeded

      private boolean afterTagLineBreakNeeded
    • leadingAndEndWhitespacesAllowed

      private boolean leadingAndEndWhitespacesAllowed
  • Constructor Details

    • Display

      private Display(boolean afterTagLineBreakNeeded, boolean leadingAndEndWhitespacesAllowed)
  • Method Details

    • values

      public static Display[] 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 Display 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
    • isAfterTagLineBreakNeeded

      public boolean isAfterTagLineBreakNeeded()
      Returns:
      true to advise serializers to put line break after tags with such a display type.
    • isLeadingAndEndWhitespacesAllowed

      public boolean isLeadingAndEndWhitespacesAllowed()
      Returns:
      true if tag contents can have single leading or end whitespace