ucar.ma2
Class SequenceIterator

java.lang.Object
  extended by ucar.ma2.SequenceIterator
All Implemented Interfaces:
StructureDataIterator

public class SequenceIterator
extends Object
implements StructureDataIterator

Creates a StructureDataIterator by wrapping a section of a ArrayStructure.

Since:
Nov 16, 2009
Author:
caron

Constructor Summary
SequenceIterator(int start, int size, ArrayStructure abb)
           
 
Method Summary
 int getCurrentRecno()
           
 boolean hasNext()
          See if theres more StructureData in the iteration.
 StructureData next()
          Get the next StructureData in the iteration.
 StructureDataIterator reset()
          Start the iteration over again.
 void setBufferSize(int bytes)
          Hint to use this much memory in buffering the iteration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceIterator

public SequenceIterator(int start,
                        int size,
                        ArrayStructure abb)
Method Detail

hasNext

public boolean hasNext()
                throws IOException
Description copied from interface: StructureDataIterator
See if theres more StructureData in the iteration. You must always call this before calling next().

Specified by:
hasNext in interface StructureDataIterator
Returns:
true if more records are available
Throws:
IOException - on read error

next

public StructureData next()
                   throws IOException
Description copied from interface: StructureDataIterator
Get the next StructureData in the iteration.

Specified by:
next in interface StructureDataIterator
Returns:
next StructureData record.
Throws:
IOException - on read error

setBufferSize

public void setBufferSize(int bytes)
Description copied from interface: StructureDataIterator
Hint to use this much memory in buffering the iteration. No guarentee that it will be used by the implementation.

Specified by:
setBufferSize in interface StructureDataIterator
Parameters:
bytes - amount of memory in bytes

reset

public StructureDataIterator reset()
Description copied from interface: StructureDataIterator
Start the iteration over again.

Specified by:
reset in interface StructureDataIterator
Returns:
a new or reset iterator.

getCurrentRecno

public int getCurrentRecno()
Specified by:
getCurrentRecno in interface StructureDataIterator


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.