Package ucar.nc2.ft.point
Class PointIteratorFiltered
- java.lang.Object
-
- ucar.nc2.ft.point.PointIteratorAbstract
-
- ucar.nc2.ft.point.PointIteratorFiltered
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<PointFeature>,PointFeatureIterator
public class PointIteratorFiltered extends PointIteratorAbstract
Decorate a PointFeatureIterator with filtering.- Since:
- Mar 20, 2008
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPointIteratorFiltered.SpaceAndTimeFilterA filter that only permits features whose lat/lon falls within a given bounding box AND whose observation time falls within a given date range.-
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
-
-
Constructor Summary
Constructors Constructor Description PointIteratorFiltered(PointFeatureIterator origIter, PointFeatureIterator.Filter filter)PointIteratorFiltered(PointFeatureIterator orgIter, LatLonRect filter_bb, CalendarDateRange filter_date)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Make sure that the iterator is complete, and recover resources.booleanhasNext()Returnstrueif the iteration has more elements.PointFeaturenext()Returns the next element in the iteration.-
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
-
-
-
-
Constructor Detail
-
PointIteratorFiltered
public PointIteratorFiltered(PointFeatureIterator orgIter, LatLonRect filter_bb, CalendarDateRange filter_date)
-
PointIteratorFiltered
public PointIteratorFiltered(PointFeatureIterator origIter, PointFeatureIterator.Filter filter)
-
-
Method Detail
-
hasNext
public boolean hasNext()
Returnstrueif the iteration has more elements. (In other words, returnstrueifnext()would return an element rather than throwing an exception.) This method is idempotent, meaning that when it is called repeatedly without an interveningnext(), calls after the first will have no effect.- Returns:
trueif the iteration has more elements
-
next
public PointFeature next() throws NoSuchElementException
Returns the next element in the iteration.- Returns:
- the next element in the iteration
- Throws:
NoSuchElementException- if the iteration has no more elements.
-
close
public void close()
Description copied from interface:PointFeatureIteratorMake 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).
-
-