javax.swing.text.html

Class HTMLDocument.Iterator

public abstract static class HTMLDocument.Iterator extends Object

An iterator over a particular type of tag.
Method Summary
abstract AttributeSetgetAttributes()
Return the attribute set for this tag.
abstract intgetEndOffset()
Get the end of the range for the current occurrence of the tag being defined and having the same attributes.
abstract intgetStartOffset()
Get the start of the range for the current occurrence of the tag being defined and having the same attributes.
abstract HTML.TaggetTag()
Type of tag this iterator represents.
abstract booleanisValid()
Indicates whether or not the iterator currently represents an occurrence of the tag.
abstract voidnext()
Move the iterator forward.

Method Detail

getAttributes

public abstract AttributeSet getAttributes()
Return the attribute set for this tag.

Returns: the AttributeSet (null if none found).

getEndOffset

public abstract int getEndOffset()
Get the end of the range for the current occurrence of the tag being defined and having the same attributes.

Returns: the end of the range

getStartOffset

public abstract int getStartOffset()
Get the start of the range for the current occurrence of the tag being defined and having the same attributes.

Returns: the start of the range (-1 if it can't be found).

getTag

public abstract HTML.Tag getTag()
Type of tag this iterator represents.

Returns: the tag.

isValid

public abstract boolean isValid()
Indicates whether or not the iterator currently represents an occurrence of the tag.

Returns: true if the iterator currently represents an occurrence of the tag.

next

public abstract void next()
Move the iterator forward.