ucar.nc2.ft.point
Class PointIteratorFromStructureData
java.lang.Object
ucar.nc2.ft.point.PointIteratorAbstract
ucar.nc2.ft.point.PointIteratorFromStructureData
- All Implemented Interfaces:
- PointFeatureIterator
- Direct Known Subclasses:
- StandardPointFeatureIterator
public abstract class PointIteratorFromStructureData
- extends PointIteratorAbstract
A PointFeatureIterator which uses a StructureDataIterator to iterate over members of a Structure,
with optional filtering and calculation of time range and bounding box.
Subclass must implement makeFeature() to turn the StructureData into a PointFeature.
- Since:
- Feb 29, 2008
- Author:
- caron
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PointIteratorFromStructureData
public PointIteratorFromStructureData(StructureDataIterator structIter,
PointIteratorAbstract.Filter filter)
throws java.io.IOException
- Throws:
java.io.IOException
makeFeature
protected abstract PointFeature makeFeature(int recnum,
StructureData sdata)
throws java.io.IOException
- Throws:
java.io.IOException
hasNext
public boolean hasNext()
throws java.io.IOException
- Description copied from interface:
PointFeatureIterator
- Check if another PointFeature is available
- Returns:
- true if another PointFeature is available
- Throws:
java.io.IOException - on i/o error
next
public PointFeature next()
throws java.io.IOException
- Description copied from interface:
PointFeatureIterator
- Returns the next PointFeature.
You must call hasNext() before calling next(), even if you know it will return true.
- Returns:
- the next PointFeature
- Throws:
java.io.IOException - on i/o error
setBufferSize
public void setBufferSize(int bytes)
- Description copied from interface:
PointFeatureIterator
- Hint to use this much memory in buffering the iteration.
No guarentee that it will be used by the implementation.
- Parameters:
bytes - amount of memory in bytes
finish
public void finish()
- Description copied from interface:
PointFeatureIterator
- Make sure that the iterator is complete, and recover resources.
You must complete the iteration (until hasNext() returns false) or call finish().
may be called more than once.
nextStructureData
protected StructureData nextStructureData()
throws java.io.IOException
- Throws:
java.io.IOException