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