org.geotools.data.store
Class MaxFeaturesIterator<F extends org.opengis.feature.Feature>

java.lang.Object
  extended by org.geotools.data.store.MaxFeaturesIterator<F>
All Implemented Interfaces:
java.util.Iterator<F>

public class MaxFeaturesIterator<F extends org.opengis.feature.Feature>
extends java.lang.Object
implements java.util.Iterator<F>

Iterator wrapper which caps the number of returned features;

Author:
Justin Deoliveira, The Open Planning Project

Constructor Summary
MaxFeaturesIterator(java.util.Iterator<F> delegate, long max)
           
 
Method Summary
 java.util.Iterator<F> getDelegate()
           
 boolean hasNext()
           
 F next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxFeaturesIterator

public MaxFeaturesIterator(java.util.Iterator<F> delegate,
                           long max)
Method Detail

getDelegate

public java.util.Iterator<F> getDelegate()

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<F extends org.opengis.feature.Feature>

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<F extends org.opengis.feature.Feature>

next

public F next()
Specified by:
next in interface java.util.Iterator<F extends org.opengis.feature.Feature>


Copyright © 1996-2010 Geotools. All Rights Reserved.