public final class SkipIterator extends Object implements Iterator<Object>, Closeable
Constructor and Description |
---|
SkipIterator(Iterator<?> it,
int skip)
Creates a new skip iterator
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
hasNext() |
Object |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public SkipIterator(Iterator<?> it, int skip)
it
- the iteratorskip
- number of times to skipIllegalArgumentException
- is thrown if skip is not a positive numberpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Apache Camel