E - the type of the elementsK - the type of the transformed elementspublic final class ChunkIterable<E,K> extends java.lang.Object implements java.lang.Iterable<java.util.Map.Entry<K,RubyArray<E>>>
ChunkIterable 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 |
|---|
ChunkIterable(java.lang.Iterable<? extends E> iter,
TransformBlock<? super E,? extends K> block)
Creates a
ChunkIterable. |
public ChunkIterable(java.lang.Iterable<? extends E> iter, TransformBlock<? super E,? extends K> block)
ChunkIterable.iter - an Iterableblock - to transform each elementjava.lang.NullPointerException - if iterable or block is null