org.cyberneko.html

Class HTMLElements.Element

Enclosing Class:
HTMLElements

public static class HTMLElements.Element
extends Object

Element information.
Author:
Andy Clark

Field Summary

static int
BLOCK
Block element.
static int
CONTAINER
Container element.
static int
EMPTY
Empty element.
static int
INLINE
Inline element.
static int
SPECIAL
Special element.
short
bounds
The bounding element code.
short[]
closes
List of elements this element can close.
short
code
The element code.
int
flags
Informational flags.
String
name
The element name.
HTMLElements.Element[]
parent
Parent elements.
short[]
parentCodes
Parent elements.

Constructor Summary

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 parent, short[] closes)
Constructs an element object.
Element(short code, String name, int flags, short[] parents, short bounds, short[] closes)
Constructs an element object.
Element(short code, String name, int flags, short[] parents, short[] closes)
Constructs an element object.

Method Summary

boolean
closes(short tag)
Returns true if this element can close the specified Element.
boolean
equals(Object o)
Returns true if the objects are equal.
int
hashCode()
Returns a hash code for this object.
boolean
isBlock()
Returns true if this element is a block element.
boolean
isContainer()
Returns true if this element is a container element.
boolean
isEmpty()
Returns true if this element is an empty element.
boolean
isInline()
Returns true if this element is an inline element.
boolean
isSpecial()
Returns true if this element is special -- if its content should be parsed ignoring markup.

Field Details

BLOCK

public static final int BLOCK
Block element.
Field Value:
2

CONTAINER

public static final int CONTAINER
Container element.
Field Value:
8

EMPTY

public static final int EMPTY
Empty element.
Field Value:
4

INLINE

public static final int INLINE
Inline element.
Field Value:
1

SPECIAL

public static final int SPECIAL
Special element.
Field Value:
16

bounds

public short bounds
The bounding element code.

closes

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

code

public short code
The element code.

flags

public int flags
Informational flags.

name

public String name
The element name.

parent

public HTMLElements.Element[] parent
Parent elements.

parentCodes

public short[] parentCodes
Parent elements.

Constructor Details

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 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[] 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.

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.

Method Details

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.