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