org.dom4j.tree
Class FilterIterator
java.lang.Object
org.dom4j.tree.FilterIterator
- All Implemented Interfaces:
- java.util.Iterator
- Direct Known Subclasses:
- ElementIterator, ElementNameIterator, ElementQNameIterator
- public abstract class FilterIterator
- extends java.lang.Object
- implements java.util.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
Field Summary |
protected java.util.Iterator |
proxy
|
Method Summary |
protected java.lang.Object |
findNext()
|
boolean |
hasNext()
|
protected abstract boolean |
matches(java.lang.Object element)
Filter method to perform some matching on the given element. |
java.lang.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 java.util.Iterator proxy
FilterIterator
public FilterIterator(java.util.Iterator proxy)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator
next
public java.lang.Object next()
throws java.util.NoSuchElementException
- Specified by:
next
in interface java.util.Iterator
- Throws:
java.util.NoSuchElementException
remove
public void remove()
- Always throws UnsupportedOperationException as this class
does look-ahead with its internal iterator.
- Specified by:
remove
in interface java.util.Iterator
- Throws:
java.lang.UnsupportedOperationException
- always
matches
protected abstract boolean matches(java.lang.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 java.lang.Object findNext()
Copyright © 2001 MetaStuff Ltd. All Rights Reserved. Hosted by