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