Package org.apache.camel.support
Class GroupIterator
java.lang.Object
org.apache.camel.support.GroupIterator
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<Object>
Group based
Iterator which groups the given Iterator a number of times and then return a combined
response as a List.
This implementation uses a internal array list, to combine the response.- See Also:
-
Constructor Details
-
GroupIterator
Creates a new group iterator- Parameters:
it- the iterator to groupgroup- number of parts to group together- Throws:
IllegalArgumentException- is thrown if group is not a positive number
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove()
-