E - the type of the elementspublic final class StepIterator<E>
extends java.lang.Object
implements java.util.Iterator<E>
StepIterator iterates elements by skipping n elements each time.| Constructor and Description |
|---|
StepIterator(java.util.Iterator<? extends E> iter,
int step)
Creates a
StepIterator. |
public StepIterator(java.util.Iterator<? extends E> iter, int step)
StepIterator.iter - an Iteratorstep - number of elements to skipjava.lang.NullPointerException - if iter is nulljava.lang.IllegalArgumentException - if step is less than or equal to 0