Package org.apache.camel.util
Class SkipIterator
- java.lang.Object
-
- org.apache.camel.util.SkipIterator
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<Object>
public final class SkipIterator extends Object implements Iterator<Object>, Closeable
-
-
Constructor Summary
Constructors Constructor Description SkipIterator(Iterator<?> it, int skip)Creates a new skip iterator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanhasNext()Objectnext()voidremove()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
SkipIterator
public SkipIterator(Iterator<?> it, int skip)
Creates a new skip iterator- Parameters:
it- the iteratorskip- number of times to skip- Throws:
IllegalArgumentException- is thrown if skip is not a positive number
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-