Package org.apache.camel.support
Class IteratorConvertTo
java.lang.Object
org.apache.camel.support.IteratorConvertTo
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterator<Object>
Wraps an
Iterator
so its returned values are automatically converted to a given type.-
Constructor Summary
ConstructorsConstructorDescriptionIteratorConvertTo
(org.apache.camel.Exchange exchange, Iterator<?> it, Class<?> type) Creates the convert iterator. -
Method Summary
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 Details
-
IteratorConvertTo
Creates the convert iterator.- Parameters:
exchange
- the exchangeit
- the iterator to wraptype
- the type to convert to
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove()
-