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