Package org.htmlunit.cyberneko
Class HTMLElements.Element
java.lang.Object
org.htmlunit.cyberneko.HTMLElements.Element
- Enclosing class:
HTMLElements
Element information.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Block element.final short
The bounding element code.final short[]
List of elements this element can close.final short
The element code.static final int
Container element.static final int
Empty element.final int
Informational flags.static final int
Inline element.final String
The element name.final String
The element name.Parent elements.(package private) short[]
Parent elements.static final int
Special element. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an element object.Constructs an element object.Constructs an element object.Constructs an element object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
closes
(short tag) boolean
int
hashCode()
final boolean
isBlock()
final boolean
final boolean
isEmpty()
final boolean
isInline()
boolean
isParent
(HTMLElements.Element element) Indicates if the provided element is an accepted parent of current elementfinal boolean
toString()
-
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
public int 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:
true
ifelement
belongs to theparent
-