|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IndexIterator
Iteration through each element of a Array in "canonical order".
The user obtains this by calling getIndexIterator() on an Array.
Canonical order for A[i][j][k] has k varying fastest, then j, then i.
Example: Replace array with its square:
IndexIterator iter = A.getIndexIterator();
while (iter.hasNext()) {
double val = iter.getDoubleNext();
iter.setDoubleCurrent( val * val);
}
Note that logical order may not be physical order.
| Method Summary | |
|---|---|
boolean |
getBooleanCurrent()
Get current value as a boolean |
boolean |
getBooleanNext()
Get next value as a boolean |
byte |
getByteCurrent()
Get current value as a byte |
byte |
getByteNext()
Get next value as a byte |
char |
getCharCurrent()
Get current value as a char |
char |
getCharNext()
Get next value as a char |
int[] |
getCurrentCounter()
get the current counter, use for debugging |
double |
getDoubleCurrent()
Get current value as a double |
double |
getDoubleNext()
Get next value as a double |
float |
getFloatCurrent()
Get current value as a float |
float |
getFloatNext()
Get next value as a float |
int |
getIntCurrent()
Get current value as a int |
int |
getIntNext()
Get next value as a int |
long |
getLongCurrent()
Get current value as a long |
long |
getLongNext()
Get next value as a long |
java.lang.Object |
getObjectCurrent()
Get current value as a Object |
java.lang.Object |
getObjectNext()
Get next value as an Object |
short |
getShortCurrent()
Get current value as a short |
short |
getShortNext()
Get next value as a short |
boolean |
hasNext()
Return true if there are more elements in the iteration. |
java.lang.Object |
next()
Get next value as an Object |
void |
setBooleanCurrent(boolean val)
Set current value with a boolean |
void |
setBooleanNext(boolean val)
Set next value with a boolean |
void |
setByteCurrent(byte val)
Set current value with a byte |
void |
setByteNext(byte val)
Set next value with a byte |
void |
setCharCurrent(char val)
Set current value with a char |
void |
setCharNext(char val)
Set next value with a char |
void |
setDoubleCurrent(double val)
Set current value with a double |
void |
setDoubleNext(double val)
Set next value with a double |
void |
setFloatCurrent(float val)
Set current value with a float |
void |
setFloatNext(float val)
Set next value with a float |
void |
setIntCurrent(int val)
Set current value with a int |
void |
setIntNext(int val)
Set next value with a int |
void |
setLongCurrent(long val)
Set current value with a long |
void |
setLongNext(long val)
Set next value with a long |
void |
setObjectCurrent(java.lang.Object val)
Set current value with a Object |
void |
setObjectNext(java.lang.Object val)
Set next value with a Object |
void |
setShortCurrent(short val)
Set current value with a short |
void |
setShortNext(short val)
Set next value with a short |
| Method Detail |
|---|
boolean hasNext()
double getDoubleNext()
void setDoubleNext(double val)
double getDoubleCurrent()
void setDoubleCurrent(double val)
float getFloatNext()
void setFloatNext(float val)
float getFloatCurrent()
void setFloatCurrent(float val)
long getLongNext()
void setLongNext(long val)
long getLongCurrent()
void setLongCurrent(long val)
int getIntNext()
void setIntNext(int val)
int getIntCurrent()
void setIntCurrent(int val)
short getShortNext()
void setShortNext(short val)
short getShortCurrent()
void setShortCurrent(short val)
byte getByteNext()
void setByteNext(byte val)
byte getByteCurrent()
void setByteCurrent(byte val)
char getCharNext()
void setCharNext(char val)
char getCharCurrent()
void setCharCurrent(char val)
boolean getBooleanNext()
void setBooleanNext(boolean val)
boolean getBooleanCurrent()
void setBooleanCurrent(boolean val)
java.lang.Object getObjectNext()
void setObjectNext(java.lang.Object val)
java.lang.Object getObjectCurrent()
void setObjectCurrent(java.lang.Object val)
java.lang.Object next()
int[] getCurrentCounter()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||