org.cyberneko.html

Class HTMLElements.Element

public static class HTMLElements.Element extends Object

Element information.

Author: Andy Clark

Field Summary
shortbounds
The bounding element code.
static intBLOCK
Block element.
short[]closes
List of elements this element can close.
shortcode
The element code.
static intCONTAINER
Container element.
static intEMPTY
Empty element.
intflags
Informational flags.
static intINLINE
Inline element.
Stringname
The element name.
HTMLElements.Element[]parent
Parent elements.
short[]parentCodes
Parent elements.
static intSPECIAL
Special element.
Constructor Summary
Element(short code, String name, int flags, short parent, short[] closes)
Constructs an element object.
Element(short code, String name, int flags, short parent, short bounds, short[] closes)
Constructs an element object.
Element(short code, String name, int flags, short[] parents, short[] closes)
Constructs an element object.
Element(short code, String name, int flags, short[] parents, short bounds, short[] closes)
Constructs an element object.
Method Summary
booleancloses(short tag)
Returns true if this element can close the specified Element.
booleanequals(Object o)
Returns true if the objects are equal.
inthashCode()
Returns a hash code for this object.
booleanisBlock()
Returns true if this element is a block element.
booleanisContainer()
Returns true if this element is a container element.
booleanisEmpty()
Returns true if this element is an empty element.
booleanisInline()
Returns true if this element is an inline element.
booleanisSpecial()
Returns true if this element is special -- if its content should be parsed ignoring markup.

Field Detail

bounds

public short bounds
The bounding element code.

BLOCK

public static final int BLOCK
Block element.

closes

public short[] closes
List of elements this element can close.

code

public short code
The element code.

CONTAINER

public static final int CONTAINER
Container element.

EMPTY

public static final int EMPTY
Empty element.

flags

public int flags
Informational flags.

INLINE

public static final int INLINE
Inline element.

name

public String name
The element name.

parent

public HTMLElements.Element[] parent
Parent elements.

parentCodes

public short[] parentCodes
Parent elements.

SPECIAL

public static final int SPECIAL
Special element.

Constructor Detail

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. 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. closes List of elements this element can close.

Method Detail

closes

public boolean closes(short tag)
Returns true if this element can close the specified Element.

Parameters: tag The element.

equals

public boolean equals(Object o)
Returns true if the objects are equal.

hashCode

public int hashCode()
Returns a hash code for this object.

isBlock

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

isContainer

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

isEmpty

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

isInline

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

isSpecial

public final boolean isSpecial()
Returns true if this element is special -- if its content should be parsed ignoring markup.
(C) Copyright 2002-2005, Andy Clark. All rights reserved.