Package ucar.nc2.ft.point.remote
Class PointIteratorStream
- java.lang.Object
-
- ucar.nc2.ft.point.PointIteratorAbstract
-
- ucar.nc2.ft.point.remote.PointIteratorStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterator<PointFeature>
,PointFeatureIterator
public class PointIteratorStream extends PointIteratorAbstract
Iterate through a stream of PointStream.MessageType.PointFeature until PointStream.MessageType.End- Since:
- May 14, 2009
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ucar.nc2.ft.PointFeatureIterator
PointFeatureIterator.Filter
-
-
Field Summary
-
Fields inherited from class ucar.nc2.ft.point.PointIteratorAbstract
calcBounds, info
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Make sure that the iterator is complete, and recover resources.boolean
hasNext()
Check if another PointFeature is available.PointFeature
next()
Returns the next PointFeature.-
Methods inherited from class ucar.nc2.ft.point.PointIteratorAbstract
calcBounds, finishCalcBounds, setCalculateBounds
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Method Detail
-
close
public void close()
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 close(). It may be called more than once (idempotent).
-
hasNext
public boolean hasNext()
Description copied from interface:PointFeatureIterator
Check if another PointFeature is available.Since this iterator may be used in a for-each statement, implementations should
close
it the first time this method returnsfalse
, as it may not get closed otherwise.- Returns:
- true if another PointFeature is available
-
next
public PointFeature next()
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
-
-