org.dom4j.tree
Class FilterIterator
java.lang.Object
|
+--org.dom4j.tree.FilterIterator
- All Implemented Interfaces:
- Iterator
- Direct Known Subclasses:
- ElementIterator, ElementNameIterator, ElementQNameIterator
- public abstract class FilterIterator
- extends Object
- implements Iterator
FilterIterator is an abstract base class which is useful
for implementors of Iterator which filter an existing iterator.
- Version:
- $Revision: 1.5 $
- Author:
- James Strachan
|
Method Summary |
protected Object |
findNext()
|
boolean |
hasNext()
|
protected abstract boolean |
matches(Object element)
Filter method to perform some matching on the given element. |
Object |
next()
|
void |
remove()
Always throws UnsupportedOperationException as this class
does look-ahead with its internal iterator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
proxy
protected Iterator proxy
FilterIterator
public FilterIterator(Iterator proxy)
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator
next
public Object next()
throws NoSuchElementException
- Specified by:
next in interface Iterator
NoSuchElementException
remove
public void remove()
- Always throws UnsupportedOperationException as this class
does look-ahead with its internal iterator.
- Specified by:
remove in interface Iterator
- Throws:
UnsupportedOperationException - always
matches
protected abstract boolean matches(Object element)
- Filter method to perform some matching on the given element.
- Returns:
- true if the given element matches the filter
and should be appear in the iteration
findNext
protected Object findNext()
Copyright © 2002-2003 MetaStuff Ltd.. All Rights Reserved.