public class RepeatingCharIterator extends UnaryCharIterator
CharIterator that cycles the values of an CharIterable forever. This class repeatedly calls
CharIterable.iterator() to receive new values when the iterator ends, so it's possible to cause this
CharIterator to terminate by providing an empty CharIterator. If the CharIterable never
returns an empty CharIterator, this CharIterator will never terminate.iteratorEMPTY| Constructor and Description |
|---|
RepeatingCharIterator(CharIterable iterable,
int times) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
char |
nextChar()
Return the next
char in this iterator. |
removeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic RepeatingCharIterator(CharIterable iterable, int times)
public boolean hasNext()
hasNext in interface java.util.Iterator<java.lang.Character>hasNext in class DelegatingIterator<java.lang.Character,CharIterator,java.lang.Character>public char nextChar()
CharIteratorchar in this iterator.