E
- the type of the elementspublic final class EachConsIterator<E> extends java.lang.Object implements java.util.Iterator<RubyArray<E>>
EachConsIterator
iterates each element by a window of size n. It
returns a RubyArray
which includes n consecutive elements within this
window.Constructor and Description |
---|
EachConsIterator(java.util.Iterator<? extends E> iter,
int size)
Creates an
EachConsIterator . |
public EachConsIterator(java.util.Iterator<? extends E> iter, int size)
EachConsIterator
.iter
- an Iteratorsize
- of the windowjava.lang.NullPointerException
- if iter is nulljava.lang.IllegalArgumentException
- if size is less than or equal to 0