| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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 iteratorpublic long getPosition()
getPosition in interface javax.jcr.RangeIteratorpublic long getSize()
getSize in interface javax.jcr.RangeIteratorpublic void skip(long n)
throws IllegalArgumentException,
NoSuchElementException
skip in interface javax.jcr.RangeIteratorn - number of elements to skipIllegalArgumentException - if n is negativeNoSuchElementException - if there are not enough elements to skippublic boolean hasNext()
public Object next() throws NoSuchElementException
next in interface IteratorNoSuchElementException - if there are no more elementspublic void remove()
throws UnsupportedOperationException
remove in interface IteratorUnsupportedOperationExceptionCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.