cdm/src/main/java/ucar/nc2/ft/point/PointIteratorFiltered.java
@Override
  public PointFeature next() throws NoSuchElementException {
    if (!hasNext()) {
      throw new NoSuchElementException("This iterator has no more elements.");
    }
    
    assert pointFeature != null;
    PointFeature ret = pointFeature;
    calcBounds(ret);
    
    pointFeature = null;  // Feature has been consumed.
    return ret;
  }
@Override
  public PointFeature next() throws NoSuchElementException {
    if (!hasNext()) {
      throw new NoSuchElementException("This iterator has no more elements.");
    }
    
    assert pointFeature != null;
    PointFeature ret = pointFeature;
    calcBounds(ret);
    
    pointFeature = null;  // Feature has been consumed.
    return ret;
  }
@ Override public PointFeature next ( ) throws NoSuchElementException { if ( ! hasNext ( ) ) { throw new NoSuchElementException ( "This iterator has no more elements." ) ; } assert pointFeature != null ; PointFeature ret = pointFeature ; calcBounds ( ret ) ; pointFeature = null ; // Feature has been consumed. return ret ; }
but we can define a stronger contract.
but we can define a stronger contract .