Package ucar.nc2.ft

Interface PointFeatureIterator

    • Method Detail

      • hasNext

        boolean hasNext()
        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 returns false, as it may not get closed otherwise.

        Specified by:
        hasNext in interface Iterator<PointFeature>
        Returns:
        true if another PointFeature is available
        Throws:
        RuntimeException - on i/o error
      • next

        PointFeature next()
        Returns the next PointFeature. You must call hasNext() before calling next(), even if you know it will return true.
        Specified by:
        next in interface Iterator<PointFeature>
        Returns:
        the next PointFeature
        Throws:
        RuntimeException - on i/o error
      • close

        void close()
        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).
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable