|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.starlink.table.ShapeIterator
public class ShapeIterator
Iterates over a shape array, as got from 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 Summary | |
|---|---|
ShapeIterator(int[] shape)
Constructs a new ShapeIterator. |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
|
int[] |
next()
|
void |
remove()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ShapeIterator(int[] shape)
shape - array of dimensions
java.lang.IllegalArgumentException - if shape has negative or
zero elements| Method Detail |
|---|
public boolean hasNext()
hasNext in interface java.util.Iterator<int[]>public int[] next()
next in interface java.util.Iterator<int[]>public void remove()
remove in interface java.util.Iterator<int[]>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||