Package org.apache.commons.io.function
Class IOIteratorAdapter<E>
java.lang.Object
org.apache.commons.io.function.IOIteratorAdapter<E>
- Type Parameters:
E
- the type of the stream elements.
- All Implemented Interfaces:
IOIterator<E>
Adapts an
Iterator
as an IOIterator
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static <E> IOIteratorAdapter<E>
Adapts the given Iterator as an IOIterator.boolean
hasNext()
LikeIterator.hasNext()
.next()
LikeIterator.next()
.unwrap()
Unwraps this instance and returns the underlyingIterator
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.commons.io.function.IOIterator
asIterator, forEachRemaining, remove
-
Field Details
-
delegate
-
-
Constructor Details
-
IOIteratorAdapter
-
-
Method Details
-
adapt
Description copied from interface:IOIterator
Adapts the given Iterator as an IOIterator.- Type Parameters:
E
- the type of the stream elements.- Parameters:
delegate
- The iterator to adapt- Returns:
- A new IOIterator
-
hasNext
Description copied from interface:IOIterator
LikeIterator.hasNext()
.- Specified by:
hasNext
in interfaceIOIterator<E>
- Returns:
- See delegate.
- Throws:
IOException
- if an I/O error occurs.
-
next
Description copied from interface:IOIterator
LikeIterator.next()
.- Specified by:
next
in interfaceIOIterator<E>
- Returns:
- See delegate.
- Throws:
IOException
- if an I/O error occurs.
-
unwrap
Description copied from interface:IOIterator
Unwraps this instance and returns the underlyingIterator
.Implementations may not have anything to unwrap and that behavior is undefined for now.
- Specified by:
unwrap
in interfaceIOIterator<E>
- Returns:
- the underlying Iterator.
-