public static class HTMLElements.Element
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BLOCK
Block element.
|
short |
bounds
The bounding element code.
|
short[] |
closes
List of elements this element can close.
|
short |
code
The element code.
|
static int |
CONTAINER
Container element.
|
static int |
EMPTY
Empty element.
|
int |
flags
Informational flags.
|
static int |
INLINE
Inline element.
|
java.lang.String |
name
The element name.
|
HTMLElements.Element[] |
parent
Parent elements.
|
short[] |
parentCodes
Parent elements.
|
static int |
SPECIAL
Special element.
|
Constructor and Description |
---|
HTMLElements.Element(short code,
java.lang.String name,
int flags,
short[] parents,
short[] closes)
Constructs an element object.
|
HTMLElements.Element(short code,
java.lang.String name,
int flags,
short[] parents,
short bounds,
short[] closes)
Constructs an element object.
|
HTMLElements.Element(short code,
java.lang.String name,
int flags,
short parent,
short[] closes)
Constructs an element object.
|
HTMLElements.Element(short code,
java.lang.String name,
int flags,
short parent,
short bounds,
short[] closes)
Constructs an element object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
closes(short tag)
Returns true if this element can close the specified Element.
|
boolean |
equals(java.lang.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 |
isParent(HTMLElements.Element element)
Indicates if the provided element is an accepted parent of current element
|
boolean |
isSpecial()
Returns true if this element is special -- if its content
should be parsed ignoring markup.
|
java.lang.String |
toString()
Provides a simple representation to make debugging easier
|
public static final int INLINE
public static final int BLOCK
public static final int EMPTY
public static final int CONTAINER
public static final int SPECIAL
public short code
public java.lang.String name
public int flags
public short[] parentCodes
public HTMLElements.Element[] parent
public short bounds
public short[] closes
public HTMLElements.Element(short code, java.lang.String name, int flags, short parent, short[] closes)
code
- The element code.name
- The element name.flags
- Informational flagsparent
- Natural closing parent name.closes
- List of elements this element can close.public HTMLElements.Element(short code, java.lang.String name, int flags, short parent, short bounds, short[] closes)
code
- The element code.name
- The element name.flags
- Informational flagsparent
- Natural closing parent name.closes
- List of elements this element can close.public HTMLElements.Element(short code, java.lang.String name, int flags, short[] parents, short[] closes)
code
- The element code.name
- The element name.flags
- Informational flagsparents
- Natural closing parent names.closes
- List of elements this element can close.public HTMLElements.Element(short code, java.lang.String name, int flags, short[] parents, short bounds, short[] closes)
code
- The element code.name
- The element name.flags
- Informational flagsparents
- Natural closing parent names.closes
- List of elements this element can close.public final boolean isInline()
public final boolean isBlock()
public final boolean isEmpty()
public final boolean isContainer()
public final boolean isSpecial()
public boolean closes(short tag)
tag
- The element.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isParent(HTMLElements.Element element)
element
- the element to test for "paternity"true
if element
belongs to the parent
(C) Copyright 2002-2014, Andy Clark, Marc Guillemot. All rights reserved.