org.apache.jackrabbit.commons.iterator
Class FilteringNodeIterator
java.lang.Object
org.apache.jackrabbit.commons.iterator.FilteringNodeIterator
- All Implemented Interfaces:
- Iterator, NodeIterator, RangeIterator
public class FilteringNodeIterator
- extends Object
- implements NodeIterator
A wrapper around a NodeIterator filtering out nodes from the base iterator
that don't match the specified filter
. Due to the nature
of the filter mechanism the size
if the iterator may
shrink upon iteration.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
base
protected final NodeIterator base
filter
protected final Predicate filter
FilteringNodeIterator
public FilteringNodeIterator(NodeIterator base,
Predicate filter)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator
- See Also:
Iterator.hasNext()
next
public Object next()
- Specified by:
next
in interface Iterator
- See Also:
Iterator.next()
remove
public void remove()
- Specified by:
remove
in interface Iterator
- See Also:
Iterator.remove()
nextNode
public Node nextNode()
- Specified by:
nextNode
in interface NodeIterator
- See Also:
NodeIterator.nextNode()
skip
public void skip(long skipNum)
- Specified by:
skip
in interface RangeIterator
- See Also:
RangeIterator.skip(long)
getSize
public long getSize()
- Specified by:
getSize
in interface RangeIterator
- See Also:
RangeIterator.getSize()
getPosition
public long getPosition()
- Specified by:
getPosition
in interface RangeIterator
- See Also:
RangeIterator.getPosition()
seekNext
protected Node seekNext()
- Returns:
Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.