public class ShapeIterator extends Object implements Iterator<int[]>
ValueInfo.getShape()
.
Will only work for a finite-valued array, not for one with a
variable last dimension (negative dimension value).
The object returned by the next
method is an array
with the same number of dimensions as the shape itself, giving
the current position (the first returned value is an N-element
array of zeros).Constructor and Description |
---|
ShapeIterator(int[] shape)
Constructs a new ShapeIterator.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
int[] |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public ShapeIterator(int[] shape)
shape
- array of dimensionsIllegalArgumentException
- if shape
has negative or
zero elementsCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.