IndexIterator, IndexIteratorSizable, java.io.Serializablepublic class IndexIteratorRectangular extends java.lang.Object implements IndexIterator, IndexIteratorSizable, java.io.Serializable
| Constructor | Description |
|---|---|
IndexIteratorRectangular(int D) |
Constructs iterator that returns int arrays of length D.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
getD() |
Returns the length of the integer array that is returned as an iterate.
|
boolean |
hasNext() |
Indicates whether all iterates have been returned since last call to reset().
|
static void |
main(java.lang.String[] args) |
main method to test and demonstrate class.
|
int[] |
next() |
Returns the next iterate, or null if hasNext is false.
|
void |
reset() |
Puts iterator in a condition to begin iteration.
|
void |
setSize(int size) |
Sets range of all indexes to the given value
Indices returned vary from 0 to size-1
|
void |
setSize(int[] size) |
Sets the individual ranges for the elements of the returned
array.
|
public IndexIteratorRectangular(int D)
public void reset()
reset in interface IndexIteratorpublic boolean hasNext()
hasNext in interface IndexIteratorpublic int[] next()
next in interface IndexIteratorpublic void setSize(int size)
public void setSize(int[] size)
setSize in interface IndexIteratorSizablepublic int getD()
getD in interface IndexIteratorpublic static void main(java.lang.String[] args)