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[] array)
Creates a new CharacterArrayIterator that iterates over the
given
char[]. |
CharacterArrayIterator(char[] array,
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[] array)
throws IllegalArgumentException
char[].
If the given char[] is null, the new
CharacterArrayIterator will behave, as if an empty char[]
has been given.
array - The char[] to iterate over.IllegalArgumentException - If the given char[] is null.public CharacterArrayIterator(char[] array,
char replacement)
throws IllegalArgumentException
char[].
If the given char[] is null, the new
CharacterArrayIterator will behave, as if an empty char[]
has been given.
array - The char[] to iterate over.replacement - The value to replace removed values with.IllegalArgumentException - If the given char[] is null.Copyright © 2015–2016 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.