ucar.nc2.ft.point
Class StructureDataIteratorIndexed

java.lang.Object
  extended by ucar.nc2.ft.point.StructureDataIteratorIndexed
All Implemented Interfaces:
StructureDataIterator

public class StructureDataIteratorIndexed
extends Object
implements StructureDataIterator

A StructureDataIterator which takes a list of record numbers (in a structure).

Since:
Feb 11, 2009
Author:
caron

Constructor Summary
StructureDataIteratorIndexed(Structure s, List<Integer> index)
           
 
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

StructureDataIteratorIndexed

public StructureDataIteratorIndexed(Structure s,
                                    List<Integer> index)
                             throws IOException
Throws:
IOException
Method Detail

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

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

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.

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

getCurrentRecno

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


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