Class HTMLElements.Element
java.lang.Object
org.htmlunit.cyberneko.HTMLElements.Element
- Enclosing class:
HTMLElements
Element information.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intBlock element.final shortThe bounding element code.final short[]List of elements this element can close.final shortThe element code.static final intContainer element.static final intEmpty element.final intInformational flags.static final intInline element.final StringThe element name.final StringThe element name.Parent elements.(package private) short[]Parent elements.static final intSpecial element. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an element object.Constructs an element object.Constructs an element object.Constructs an element object. -
Method Summary
Modifier and TypeMethodDescriptionbooleancloses(short tag) booleaninthashCode()final booleanisBlock()final booleanfinal booleanisEmpty()final booleanisInline()booleanisParent(HTMLElements.Element element) Indicates if the provided element is an accepted parent of current elementfinal booleantoString()
-
Field Details
-
INLINE
public static final int INLINEInline element.- See Also:
-
BLOCK
public static final int BLOCKBlock element.- See Also:
-
EMPTY
public static final int EMPTYEmpty element.- See Also:
-
CONTAINER
public static final int CONTAINERContainer element.- See Also:
-
SPECIAL
public static final int SPECIALSpecial element.- See Also:
-
code
public final short codeThe element code. -
name
The element name. -
lowercaseName
The element name. -
flags
public final int flagsInformational flags. -
parent
Parent elements. -
bounds
public final short boundsThe bounding element code. -
closes
public final short[] closesList of elements this element can close. -
parentCodes_
short[] parentCodes_Parent elements.
-
-
Constructor Details
-
Element
Constructs an element object.- Parameters:
code- The element code.name- The element name.flags- Informational flagsparent- Natural closing parent name.closes- List of elements this element can close.
-
Element
Constructs an element object.- Parameters:
code- The element code.name- The element name.flags- Informational flagsparent- Natural closing parent name.bounds- boundscloses- List of elements this element can close.
-
Element
Constructs an element object.- Parameters:
code- The element code.name- The element name.flags- Informational flagsparents- Natural closing parent names.closes- List of elements this element can close.
-
Element
Constructs an element object.- Parameters:
code- The element code.name- The element name.flags- Informational flagsparents- Natural closing parent names.bounds- boundscloses- 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.
-
closes
public boolean closes(short tag) - Parameters:
tag- The element.- Returns:
- true if this element can close the specified Element.
-
hashCode
-
equals
-
toString
-
isParent
Indicates if the provided element is an accepted parent of current element- Parameters:
element- the element to test for "paternity"- Returns:
trueifelementbelongs to theparent
-