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