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.

Version:
$Revision:51 $ $Date:2006-07-12 17:13:13Z $
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

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

getDoubleCurrent

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

Specified by:
getDoubleCurrent in interface IndexIterator

getDoubleNext

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

Specified by:
getDoubleNext in interface IndexIterator

setDoubleCurrent

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

Specified by:
setDoubleCurrent in interface IndexIterator

setDoubleNext

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

Specified by:
setDoubleNext in interface IndexIterator

getFloatCurrent

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

Specified by:
getFloatCurrent in interface IndexIterator

getFloatNext

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

Specified by:
getFloatNext in interface IndexIterator

setFloatCurrent

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

Specified by:
setFloatCurrent in interface IndexIterator

setFloatNext

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

Specified by:
setFloatNext in interface IndexIterator

getLongCurrent

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

Specified by:
getLongCurrent in interface IndexIterator

getLongNext

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

Specified by:
getLongNext in interface IndexIterator

setLongCurrent

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

Specified by:
setLongCurrent in interface IndexIterator

setLongNext

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

Specified by:
setLongNext in interface IndexIterator

getIntCurrent

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

Specified by:
getIntCurrent in interface IndexIterator

getIntNext

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

Specified by:
getIntNext in interface IndexIterator

setIntCurrent

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

Specified by:
setIntCurrent in interface IndexIterator

setIntNext

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

Specified by:
setIntNext in interface IndexIterator

getShortCurrent

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

Specified by:
getShortCurrent in interface IndexIterator

getShortNext

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

Specified by:
getShortNext in interface IndexIterator

setShortCurrent

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

Specified by:
setShortCurrent in interface IndexIterator

setShortNext

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

Specified by:
setShortNext in interface IndexIterator

getByteCurrent

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

Specified by:
getByteCurrent in interface IndexIterator

getByteNext

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

Specified by:
getByteNext in interface IndexIterator

setByteCurrent

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

Specified by:
setByteCurrent in interface IndexIterator

setByteNext

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

Specified by:
setByteNext in interface IndexIterator

getCharCurrent

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

Specified by:
getCharCurrent in interface IndexIterator

getCharNext

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

Specified by:
getCharNext in interface IndexIterator

setCharCurrent

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

Specified by:
setCharCurrent in interface IndexIterator

setCharNext

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

Specified by:
setCharNext in interface IndexIterator

getBooleanCurrent

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

Specified by:
getBooleanCurrent in interface IndexIterator

getBooleanNext

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

Specified by:
getBooleanNext in interface IndexIterator

setBooleanCurrent

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

Specified by:
setBooleanCurrent in interface IndexIterator

setBooleanNext

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

Specified by:
setBooleanNext in interface IndexIterator

getObjectCurrent

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

Specified by:
getObjectCurrent in interface IndexIterator

getObjectNext

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

Specified by:
getObjectNext in interface IndexIterator

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

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

next

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

Specified by:
next in interface IndexIterator