ucar.ma2
Class IteratorFast

java.lang.Object
  extended by ucar.ma2.IteratorFast
All Implemented Interfaces:
IndexIterator

public class IteratorFast
extends java.lang.Object
implements IndexIterator

A "fast" iterator that can be used when the data is in canonical order.

Author:
caron

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 hasMore(int howMany)
           
 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
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

hasNext

public boolean hasNext()
Description copied from interface: IndexIterator
Return true if there are more elements in the iteration.

Specified by:
hasNext in interface IndexIterator
Returns:
true if there are more elements in the iteration.

hasMore

public boolean hasMore(int howMany)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getCurrentCounter

public int[] getCurrentCounter()
Description copied from interface: IndexIterator
Get the current counter, use for debugging

Specified by:
getCurrentCounter in interface IndexIterator
Returns:
the current counter, use for debugging

getDoubleCurrent

public double getDoubleCurrent()
Description copied from interface: IndexIterator
Get current value as a double

Specified by:
getDoubleCurrent in interface IndexIterator
Returns:
current value as a double

getDoubleNext

public double getDoubleNext()
Description copied from interface: IndexIterator
Get next value as a double

Specified by:
getDoubleNext in interface IndexIterator
Returns:
next value as a double

setDoubleCurrent

public void setDoubleCurrent(double val)
Description copied from interface: IndexIterator
Set current value with a double

Specified by:
setDoubleCurrent in interface IndexIterator
Parameters:
val - the current value as a double

setDoubleNext

public void setDoubleNext(double val)
Description copied from interface: IndexIterator
Set next value with a double

Specified by:
setDoubleNext in interface IndexIterator
Parameters:
val - the next value as a double

getFloatCurrent

public float getFloatCurrent()
Description copied from interface: IndexIterator
Get current value as a float

Specified by:
getFloatCurrent in interface IndexIterator
Returns:
current value as a float

getFloatNext

public float getFloatNext()
Description copied from interface: IndexIterator
Get next value as a float

Specified by:
getFloatNext in interface IndexIterator
Returns:
next value as a float

setFloatCurrent

public void setFloatCurrent(float val)
Description copied from interface: IndexIterator
Set current value with a float

Specified by:
setFloatCurrent in interface IndexIterator
Parameters:
val - the current value as a float

setFloatNext

public void setFloatNext(float val)
Description copied from interface: IndexIterator
Set next value with a float

Specified by:
setFloatNext in interface IndexIterator
Parameters:
val - the next value as a float

getLongCurrent

public long getLongCurrent()
Description copied from interface: IndexIterator
Get current value as a long

Specified by:
getLongCurrent in interface IndexIterator
Returns:
current value as a long

getLongNext

public long getLongNext()
Description copied from interface: IndexIterator
Get next value as a long

Specified by:
getLongNext in interface IndexIterator
Returns:
next value as a long

setLongCurrent

public void setLongCurrent(long val)
Description copied from interface: IndexIterator
Set current value with a long

Specified by:
setLongCurrent in interface IndexIterator
Parameters:
val - the current value as a long

setLongNext

public void setLongNext(long val)
Description copied from interface: IndexIterator
Set next value with a long

Specified by:
setLongNext in interface IndexIterator
Parameters:
val - the next value as a long

getIntCurrent

public int getIntCurrent()
Description copied from interface: IndexIterator
Get current value as a int

Specified by:
getIntCurrent in interface IndexIterator
Returns:
current value as a int

getIntNext

public int getIntNext()
Description copied from interface: IndexIterator
Get next value as a int

Specified by:
getIntNext in interface IndexIterator
Returns:
next value as a int

setIntCurrent

public void setIntCurrent(int val)
Description copied from interface: IndexIterator
Set current value with a int

Specified by:
setIntCurrent in interface IndexIterator
Parameters:
val - the current value as a int

setIntNext

public void setIntNext(int val)
Description copied from interface: IndexIterator
Set next value with a int

Specified by:
setIntNext in interface IndexIterator
Parameters:
val - the next value as a int

getShortCurrent

public short getShortCurrent()
Description copied from interface: IndexIterator
Get current value as a short

Specified by:
getShortCurrent in interface IndexIterator
Returns:
current value as a short

getShortNext

public short getShortNext()
Description copied from interface: IndexIterator
Get next value as a short

Specified by:
getShortNext in interface IndexIterator
Returns:
next value as a short

setShortCurrent

public void setShortCurrent(short val)
Description copied from interface: IndexIterator
Set current value with a short

Specified by:
setShortCurrent in interface IndexIterator
Parameters:
val - the current value as a short

setShortNext

public void setShortNext(short val)
Description copied from interface: IndexIterator
Set next value with a short

Specified by:
setShortNext in interface IndexIterator
Parameters:
val - the next value as a short

getByteCurrent

public byte getByteCurrent()
Description copied from interface: IndexIterator
Get current value as a byte

Specified by:
getByteCurrent in interface IndexIterator
Returns:
current value as a byte

getByteNext

public byte getByteNext()
Description copied from interface: IndexIterator
Get next value as a byte

Specified by:
getByteNext in interface IndexIterator
Returns:
next value as a byte

setByteCurrent

public void setByteCurrent(byte val)
Description copied from interface: IndexIterator
Set current value with a byte

Specified by:
setByteCurrent in interface IndexIterator
Parameters:
val - the current value as a byte

setByteNext

public void setByteNext(byte val)
Description copied from interface: IndexIterator
Set next value with a byte

Specified by:
setByteNext in interface IndexIterator
Parameters:
val - the next value as a byte

getCharCurrent

public char getCharCurrent()
Description copied from interface: IndexIterator
Get current value as a char

Specified by:
getCharCurrent in interface IndexIterator
Returns:
current value as a char

getCharNext

public char getCharNext()
Description copied from interface: IndexIterator
Get next value as a char

Specified by:
getCharNext in interface IndexIterator
Returns:
next value as a char

setCharCurrent

public void setCharCurrent(char val)
Description copied from interface: IndexIterator
Set current value with a char

Specified by:
setCharCurrent in interface IndexIterator
Parameters:
val - the current value as a char

setCharNext

public void setCharNext(char val)
Description copied from interface: IndexIterator
Set next value with a char

Specified by:
setCharNext in interface IndexIterator
Parameters:
val - the next value as a char

getBooleanCurrent

public boolean getBooleanCurrent()
Description copied from interface: IndexIterator
Get current value as a boolean

Specified by:
getBooleanCurrent in interface IndexIterator
Returns:
current value as a boolean

getBooleanNext

public boolean getBooleanNext()
Description copied from interface: IndexIterator
Get next value as a boolean

Specified by:
getBooleanNext in interface IndexIterator
Returns:
next value as a boolean

setBooleanCurrent

public void setBooleanCurrent(boolean val)
Description copied from interface: IndexIterator
Set current value with a boolean

Specified by:
setBooleanCurrent in interface IndexIterator
Parameters:
val - the current value as a boolean

setBooleanNext

public void setBooleanNext(boolean val)
Description copied from interface: IndexIterator
Set next value with a boolean

Specified by:
setBooleanNext in interface IndexIterator
Parameters:
val - the next value as a boolean

getObjectCurrent

public java.lang.Object getObjectCurrent()
Description copied from interface: IndexIterator
Get current value as a Object

Specified by:
getObjectCurrent in interface IndexIterator
Returns:
current value as a Object

getObjectNext

public java.lang.Object getObjectNext()
Description copied from interface: IndexIterator
Get next value as an Object

Specified by:
getObjectNext in interface IndexIterator
Returns:
next value as an Object

setObjectCurrent

public void setObjectCurrent(java.lang.Object val)
Description copied from interface: IndexIterator
Set current value with a Object

Specified by:
setObjectCurrent in interface IndexIterator
Parameters:
val - the current value as a Object

setObjectNext

public void setObjectNext(java.lang.Object val)
Description copied from interface: IndexIterator
Set next value with a Object

Specified by:
setObjectNext in interface IndexIterator
Parameters:
val - the next value as a Object

next

public java.lang.Object next()
Description copied from interface: IndexIterator
Get next value as an Object

Specified by:
next in interface IndexIterator
Returns:
next value as an Object