public class SequenceCharIterator extends Object implements CharIterator
| Modifier and Type | Field and Description |
|---|---|
private int |
index
|
private int |
length
|
private CharSequence |
sequence |
END_OF_ITERATOR| Constructor and Description |
|---|
SequenceCharIterator(CharSequence sequence)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
This method determines whether there is a
next char available or the end of this iterator
has been reached. |
char |
next()
This method returns the next character to iterate or
CharIterator.END_OF_ITERATOR if the end of this iterator
has been reached. |
private final CharSequence sequence
SequenceCharIterator(CharSequence)private final int length
private int index
public SequenceCharIterator(CharSequence sequence)
sequence - the CharSequence to iterate char by char.public boolean hasNext()
next char available or the end of this iterator
has been reached.hasNext in interface CharIteratortrue if there is at least one next char available, or
false if the end of this iterator has been reached and further calls of
CharIterator.next() will return CharIterator.END_OF_ITERATOR.CharIterator.next(),
Iterator.hasNext()public char next()
CharIterator.END_OF_ITERATOR if the end of this iterator
has been reached. If CharIterator.END_OF_ITERATOR is returned further calls will always return
CharIterator.END_OF_ITERATOR.next in interface CharIteratorCharIterator.END_OF_ITERATOR if the end of this iterator has been reached.Iterator.next()Copyright © 2001–2015 mmm-Team. All rights reserved.