org.geotools.data.store
Class EmptyFeatureCollection

Object
  extended by DataFeatureCollection
      extended by EmptyFeatureCollection
All Implemented Interfaces:
SimpleFeatureCollection, FeatureCollection<SimpleFeatureType,SimpleFeature>

public class EmptyFeatureCollection
extends DataFeatureCollection


Field Summary
 
Fields inherited from class DataFeatureCollection
id, listeners, schema
 
Constructor Summary
EmptyFeatureCollection(SimpleFeatureType schema)
           
 
Method Summary
 boolean add(SimpleFeature object)
           
protected  void closeIterator(Iterator close)
           
 ReferencedEnvelope getBounds()
          Get the total bounds of this collection which is calculated by doing a union of the bounds of each feature inside of it
 int getCount()
           
 boolean isValid()
           
protected  Iterator openIterator()
          Returns a FeatureWriterIterator, or FeatureReaderIterator over content.
 boolean remove(Object object)
           
 boolean removeAll(Collection collection)
           
 
Methods inherited from class DataFeatureCollection
accepts, addAll, addAll, addListener, clear, close, close, contains, containsAll, features, fireChange, fireChange, fireChange, getID, getSchema, isEmpty, iterator, purge, reader, removeListener, retainAll, size, sort, sort, subCollection, toArray, toArray, writer
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyFeatureCollection

public EmptyFeatureCollection(SimpleFeatureType schema)
Method Detail

getBounds

public ReferencedEnvelope getBounds()
Description copied from interface: FeatureCollection
Get the total bounds of this collection which is calculated by doing a union of the bounds of each feature inside of it

Specified by:
getBounds in interface FeatureCollection<SimpleFeatureType,SimpleFeature>
Specified by:
getBounds in class DataFeatureCollection
Returns:
An Envelope containing the total bounds of this collection.

getCount

public int getCount()
             throws IOException
Specified by:
getCount in class DataFeatureCollection
Throws:
IOException

openIterator

protected Iterator openIterator()
Description copied from class: DataFeatureCollection
Returns a FeatureWriterIterator, or FeatureReaderIterator over content.

If you have a way to tell that you are readonly please subclass with a less hardcore check - this implementations catches a UnsupportedOpperationsException from wrtier()!

Overrides:
openIterator in class DataFeatureCollection
Returns:
Iterator, should be closed closeIterator

closeIterator

protected void closeIterator(Iterator close)
Overrides:
closeIterator in class DataFeatureCollection

add

public boolean add(SimpleFeature object)
Overrides:
add in class DataFeatureCollection

remove

public boolean remove(Object object)
Overrides:
remove in class DataFeatureCollection

removeAll

public boolean removeAll(Collection collection)
Overrides:
removeAll in class DataFeatureCollection

isValid

public boolean isValid()


Copyright © 1996-2014 Geotools. All Rights Reserved.