|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.commons.iterator.FilteredRangeIterator
public class FilteredRangeIterator
Filtering decorator for iterators.
| Constructor Summary | |
|---|---|
FilteredRangeIterator(Iterator<?> iterator)
Creates a pre-fetching decorator for the given iterator. |
|
FilteredRangeIterator(Iterator<?> iterator,
Predicate predicate)
Creates a new filtered iterator with the default pre-fetch buffer size. |
|
FilteredRangeIterator(Iterator<?> iterator,
Predicate predicate,
int bufferSize)
Creates a new filtered iterator. |
|
| Method Summary | |
|---|---|
long |
getPosition()
Returns the zero-based position of the next element in this iterator. |
long |
getSize()
Returns the total number of elements in this iterator, or -1 if that number is unknown. |
boolean |
hasNext()
Checks whether there are more elements in this iterator. |
Object |
next()
Returns the next element in this iterator. |
void |
remove()
Not supported. |
void |
skip(long n)
Skips the next n elements. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FilteredRangeIterator(Iterator<?> iterator,
Predicate predicate,
int bufferSize)
iterator - underlying iteratorpredicate - bufferSize -
public FilteredRangeIterator(Iterator<?> iterator,
Predicate predicate)
iterator - underlying iteratorpredicate - predicate used for filteringpublic FilteredRangeIterator(Iterator<?> iterator)
iterator - underlying iterator| Method Detail |
|---|
public long getPosition()
getPosition in interface RangeIteratorpublic long getSize()
getSize in interface RangeIterator
public void skip(long n)
throws IllegalArgumentException,
NoSuchElementException
skip in interface RangeIteratorn - number of elements to skip
IllegalArgumentException - if n is negative
NoSuchElementException - if there are not enough elements to skippublic boolean hasNext()
hasNext in interface Iteratortrue if there are more elements,
false otherwise
public Object next()
throws NoSuchElementException
next in interface IteratorNoSuchElementException - if there are no more elements
public void remove()
throws UnsupportedOperationException
remove in interface IteratorUnsupportedOperationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||