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