public interface IndexIterator
Example: Replace array with its square:
IndexIterator iter = A.getIndexIterator(); while (iter.hasNext()) { double val = iter.getDoubleNext(); iter.setDoubleCurrent( val * val); }Note that canonical order may not be physical order.
Modifier and Type | Method and Description |
---|---|
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
|
boolean hasNext()
double getDoubleNext()
void setDoubleNext(double val)
val
- the next value as a doubledouble getDoubleCurrent()
void setDoubleCurrent(double val)
val
- the current value as a doublefloat getFloatNext()
void setFloatNext(float val)
val
- the next value as a floatfloat getFloatCurrent()
void setFloatCurrent(float val)
val
- the current value as a floatlong getLongNext()
void setLongNext(long val)
val
- the next value as a longlong getLongCurrent()
void setLongCurrent(long val)
val
- the current value as a longint getIntNext()
void setIntNext(int val)
val
- the next value as a intint getIntCurrent()
void setIntCurrent(int val)
val
- the current value as a intshort getShortNext()
void setShortNext(short val)
val
- the next value as a shortshort getShortCurrent()
void setShortCurrent(short val)
val
- the current value as a shortbyte getByteNext()
void setByteNext(byte val)
val
- the next value as a bytebyte getByteCurrent()
void setByteCurrent(byte val)
val
- the current value as a bytechar getCharNext()
void setCharNext(char val)
val
- the next value as a charchar getCharCurrent()
void setCharCurrent(char val)
val
- the current value as a charboolean getBooleanNext()
void setBooleanNext(boolean val)
val
- the next value as a booleanboolean getBooleanCurrent()
void setBooleanCurrent(boolean val)
val
- the current value as a booleanjava.lang.Object getObjectNext()
void setObjectNext(java.lang.Object val)
val
- the next value as a Objectjava.lang.Object getObjectCurrent()
void setObjectCurrent(java.lang.Object val)
val
- the current value as a Objectjava.lang.Object next()
int[] getCurrentCounter()