Package org.cyberneko.html
Class HTMLElements.Element
java.lang.Object
org.cyberneko.html.HTMLElements.Element
- Enclosing class:
- HTMLElements
Element information.
- Author:
- Andy Clark
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Block element.short
The bounding element code.short[]
List of elements this element can close.short
The element code.static final int
Container element.static final int
Empty element.int
Informational flags.static final int
Inline element.The element name.Parent elements.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) Returns true if this element can close the specified Element.boolean
Returns true if the objects are equal.int
hashCode()
Returns a hash code for this object.final boolean
isBlock()
Returns true if this element is a block element.final boolean
Returns true if this element is a container element.final boolean
isEmpty()
Returns true if this element is an empty element.final boolean
isInline()
Returns true if this element is an inline element.boolean
isParent
(HTMLElements.Element element) Indicates if the provided element is an accepted parent of current elementfinal boolean
Returns true if this element is special -- if its content should be parsed ignoring markup.toString()
Provides a simple representation to make debugging easier
-
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 short codeThe element code. -
name
The element name. -
flags
public int flagsInformational flags. -
parentCodes
public short[] parentCodesParent elements. -
parent
Parent elements. -
bounds
public short boundsThe bounding element code. -
closes
public short[] closesList of elements this element can close.
-
-
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.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.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.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. -
closes
public boolean closes(short tag) Returns true if this element can close the specified Element.- Parameters:
tag
- The element.
-
hashCode
public int hashCode()Returns a hash code for this object. -
equals
Returns true if the objects are equal. -
toString
Provides a simple representation to make debugging easier -
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
-