public final class CharacterArrayIterator extends Object implements Iterator<Character>
CharacterArrayIterator is an Iterator that iterates over a
given char[].
Calling remove() sets the array to
0 at the index that corresponds to the last value returned by
next().
| Constructor and Description |
|---|
CharacterArrayIterator(char[] values)
Creates a new CharacterArrayIterator that iterates over the
given
char[]. |
CharacterArrayIterator(char[] values,
char replacement)
Creates a new CharacterArrayIterator that iterates over the
given
char[]. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
Character |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic CharacterArrayIterator(char[] values)
char[].
If the given char[] is null, the new
CharacterArrayIterator will behave, as if an empty char[]
has been given.
values - The char[] to iterate over.public CharacterArrayIterator(char[] values,
char replacement)
char[].
If the given char[] is null, the new
CharacterArrayIterator will behave, as if an empty char[]
has been given.
values - The char[] to iterate over.replacement - The value to replace removed values with.Copyright © 2015–2016 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.