Package uk.ac.starlink.table
Class ShapeIterator
- java.lang.Object
-
- uk.ac.starlink.table.ShapeIterator
-
- All Implemented Interfaces:
java.util.Iterator<int[]>
public class ShapeIterator extends java.lang.Object implements java.util.Iterator<int[]>
Iterates over a shape array, as got fromValueInfo.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).- Since:
- 2 Mar 2005
- Author:
- Mark Taylor (Starlink)
-
-
Constructor Summary
Constructors Constructor Description ShapeIterator(int[] shape)
Constructs a new ShapeIterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
int[]
next()
void
remove()
-