Class FilteringNodeIterator
java.lang.Object
org.apache.jackrabbit.commons.iterator.FilteringNodeIterator
- All Implemented Interfaces:
Iterator,NodeIterator,RangeIterator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the current position within the iterator.longgetSize()Returns the total number of of items available through this iterator.booleanhasNext()next()nextNode()Returns the nextNodein the iteration.voidremove()voidskip(long skipNum) Skip a number of elements in the iterator.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
FilteringNodeIterator
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
nextNode
Description copied from interface:NodeIteratorReturns the nextNodein the iteration.- Specified by:
nextNodein interfaceNodeIterator- Returns:
- the next
Nodein the iteration. - See Also:
-
skip
public void skip(long skipNum) Description copied from interface:RangeIteratorSkip a number of elements in the iterator.- Specified by:
skipin interfaceRangeIterator- Parameters:
skipNum- the non-negative number of elements to skip- See Also:
-
getSize
public long getSize()Description copied from interface:RangeIteratorReturns the total number of of items available through this iterator. For example, for some nodeN,N.getNodes().getSize()returns the number of child nodes ofNvisible through the currentSession. In some implementations precise information about the number of elements may not be available. In such cases this method must return -1. API clients will then be able to useRangeIterator.getNumberRemainingto get an estimate on the number of elements.- Specified by:
getSizein interfaceRangeIterator- Returns:
- a long
- See Also:
-
getPosition
public long getPosition()Description copied from interface:RangeIteratorReturns the current position within the iterator. The number returned is the 0-based index of the next element in the iterator, i.e. the one that will be returned on the subsequentnextcall.Note that this method does not check if there is a next element, i.e. an empty iterator will always return 0.
- Specified by:
getPositionin interfaceRangeIterator- Returns:
- a long
- See Also:
-