Class HTMLElements.Element

java.lang.Object
org.htmlunit.cyberneko.HTMLElements.Element
Enclosing class:
HTMLElements

public static class HTMLElements.Element extends Object
Element information.
  • Field Details

  • Constructor Details

    • Element

      public Element(short code, String name, int flags, short parent, short[] closes)
      Constructs an element object.
      Parameters:
      code - The element code.
      name - The element name.
      flags - Informational flags
      parent - Natural closing parent name.
      closes - List of elements this element can close.
    • Element

      public Element(short code, String name, int flags, short parent, short bounds, short[] closes)
      Constructs an element object.
      Parameters:
      code - The element code.
      name - The element name.
      flags - Informational flags
      parent - Natural closing parent name.
      bounds - bounds
      closes - List of elements this element can close.
    • Element

      public Element(short code, String name, int flags, short[] parents, short[] closes)
      Constructs an element object.
      Parameters:
      code - The element code.
      name - The element name.
      flags - Informational flags
      parents - Natural closing parent names.
      closes - List of elements this element can close.
    • Element

      public Element(short code, String name, int flags, short[] parents, short bounds, short[] closes)
      Constructs an element object.
      Parameters:
      code - The element code.
      name - The element name.
      flags - Informational flags
      parents - Natural closing parent names.
      bounds - bounds
      closes - List of elements this element can close.
  • Method Details

    • isInline

      public final boolean isInline()
      Returns:
      true if this element is an inline element.
    • isBlock

      public final boolean isBlock()
      Returns:
      true if this element is a block element.
    • isEmpty

      public final boolean isEmpty()
      Returns:
      true if this element is an empty element.
    • isContainer

      public final boolean isContainer()
      Returns:
      true if this element is a container element.
    • isSpecial

      public final boolean isSpecial()
      Returns:
      true if this element is special -- if its content should be parsed ignoring markup.
    • isScriptSupporting

      public final boolean isScriptSupporting()
      Returns:
      true if this element is a script-supporting one.
    • isFormatting

      public final boolean isFormatting()
      Returns:
      true if this element is formatting one.
    • closes

      public boolean closes(short tag)
      Parameters:
      tag - The element.
      Returns:
      true if this element can close the specified Element.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Returns:
      a hash code for this object.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      Returns:
      true if the objects are equal.
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      a simple representation to make debugging easier
    • isParent

      public boolean isParent(HTMLElements.Element element)
      Indicates if the provided element is an accepted parent of current element.
      Parameters:
      element - the element to test for "paternity"
      Returns:
      true if element belongs to the parent