E
- the type of the elementsK
- the type of the transformed elementspublic final class ChunkIterator<E,K> extends java.lang.Object implements java.util.Iterator<java.util.Map.Entry<K,RubyArray<E>>>
ChunkIterator
transforms elements first, and then puts the original
elements together if elements which are next to each others have the same
transformed value. Chucked elements are placed into an Entry which uses
transformed value as key and a RubyArray of elements as value.Constructor and Description |
---|
ChunkIterator(java.util.Iterator<? extends E> iter,
TransformBlock<? super E,? extends K> block)
Creates a
ChunkIterator . |
public ChunkIterator(java.util.Iterator<? extends E> iter, TransformBlock<? super E,? extends K> block)
ChunkIterator
.iter
- an Iteratorblock
- to transform each elementjava.lang.NullPointerException
- if iterator or block is null