public class RepeatingIntIterator extends UnaryIntIterator
IntIterator that cycles the values of an IntIterable forever. This class repeatedly calls
IntIterable.iterator() to receive new values when the iterator ends, so it's possible to cause this
IntIterator to terminate by providing an empty IntIterator. If the IntIterable never
returns an empty IntIterator, this IntIterator will never terminate.iteratorEMPTY| Constructor and Description |
|---|
RepeatingIntIterator(IntIterable iterable,
int times) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
int |
nextInt() |
removeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontains, count, from, from, from, from, from, from, from, from, from, from, from, isEmpty, of, reduce, removeAll, skip, skippublic RepeatingIntIterator(IntIterable iterable, int times)
public boolean hasNext()
hasNext in interface java.util.Iterator<java.lang.Integer>hasNext in class DelegatingIterator<java.lang.Integer,IntIterator,java.lang.Integer>public int nextInt()