APIdia Launch Partner
Top Description Fields Constructors Methods
javax.swing.text.html.parser

pack-priv final Class TagStack

extends Object
implements DTDConstants
Class Inheritance
All Implemented Interfaces
javax.swing.text.html.parser.DTDConstants
Imports
java.util.BitSet, .Vector, java.io.*

A stack of tags. Used while parsing an HTML document. It, together with the ContentModelStates, defines the complete state of the parser while reading a document. When a start tag is encountered an element is pushed onto the stack, when an end tag is encountered an element is popped off the stack.
Author
Arthur van Hoff
See Also
Parser, DTD, ContentModelState

Field Summary

Modifier and TypeField and Description
pack-priv Element
pack-priv BitSet
pack-priv BitSet
pack-priv boolean
pack-priv TagStack
pack-priv boolean
pack-priv ContentModelState
pack-priv TagElement

Constructor Summary

AccessConstructor and Description
pack-priv
TagStack(TagElement tag, TagStack next)

Construct a stack element.

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
advance(Element elem)

Advance the state by reducing the given element.

public ContentModel
contentModel()

Return the ContentModel that must be satisfied by what comes next in the input stream.

pack-priv boolean
excluded(int elemIndex)

Return true if the element that is contained at the index specified by the parameter is part of the exclusions specified in the DTD for the element currently on the TagStack.

public Element
first()

Return the element that must come next in the input stream.

pack-priv boolean
terminate()

Return true if the current state can be terminated.

public String
toString()

Overrides java.lang.Object.toString.

Convert to a string.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

elemback to summary
pack-priv Element elem
exclusionsback to summary
pack-priv BitSet exclusions
inclusionsback to summary
pack-priv BitSet inclusions
netback to summary
pack-priv boolean net
nextback to summary
pack-priv TagStack next
preback to summary
pack-priv boolean pre
stateback to summary
pack-priv ContentModelState state
tagback to summary
pack-priv TagElement tag

Constructor Detail

TagStackback to summary
pack-priv TagStack(TagElement tag, TagStack next)

Construct a stack element.

Method Detail

advanceback to summary
pack-priv boolean advance(Element elem)

Advance the state by reducing the given element. Returns false if the element is not legal and the state is not advanced.

contentModelback to summary
public ContentModel contentModel()

Return the ContentModel that must be satisfied by what comes next in the input stream.

excludedback to summary
pack-priv boolean excluded(int elemIndex)

Return true if the element that is contained at the index specified by the parameter is part of the exclusions specified in the DTD for the element currently on the TagStack.

firstback to summary
public Element first()

Return the element that must come next in the input stream.

terminateback to summary
pack-priv boolean terminate()

Return true if the current state can be terminated.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Convert to a string.