|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.xslthl.FilteredElementIterator
public class FilteredElementIterator
An iterator over the child elements of a given element, filtered by a set of element names.
| Nested Class Summary | |
|---|---|
static interface |
FilteredElementIterator.Acceptor
Defines a filter used by this iterator |
static class |
FilteredElementIterator.TagNameAcceptor
Acceptor that accepts elements based on the tag name |
| Field Summary | |
|---|---|
protected FilteredElementIterator.Acceptor |
acceptor
The used acceptor for filtering |
protected Element |
base
The current element |
protected Element |
current
The current element |
protected boolean |
dirty
If true a new value should be retrieved |
protected boolean |
finished
Will be true if the search reached an end |
| Constructor Summary | |
|---|---|
FilteredElementIterator(Element baseElement,
FilteredElementIterator.Acceptor filter)
|
|
FilteredElementIterator(Element baseElement,
Set<String> acceptTagNames)
Creates a filtered element iterator that accepts elements with a given tag name |
|
| Method Summary | |
|---|---|
protected Element |
getAcceptedElement(Node node)
Get the next accepted element. |
protected void |
getNextElement()
Get the next valid element |
boolean |
hasNext()
|
Element |
next()
|
void |
remove()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Element base
protected Element current
protected FilteredElementIterator.Acceptor acceptor
protected boolean dirty
protected boolean finished
| Constructor Detail |
|---|
public FilteredElementIterator(Element baseElement,
FilteredElementIterator.Acceptor filter)
public FilteredElementIterator(Element baseElement,
Set<String> acceptTagNames)
baseElement - acceptTagNames - | Method Detail |
|---|
public boolean hasNext()
hasNext in interface Iterator<Element>public Element next()
next in interface Iterator<Element>public void remove()
remove in interface Iterator<Element>protected void getNextElement()
protected Element getAcceptedElement(Node node)
node - The first node to test
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||