01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.feature;
17:
18: /**
19: * An IndexedFeatureCollection extends the functionality of FeatureCollection
20: * by allowing FeatureIndex attachement.
21: * @author Ian Schneider
22: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/main/src/main/java/org/geotools/feature/IndexedFeatureCollection.java $
23: */
24: public interface IndexedFeatureCollection extends FeatureCollection {
25:
26: /** Adds a FeatureIndex to this collection.
27: * @param index The FeatureIndex to add.
28: * @throws NullPointerException If the index is null.
29: */
30: void addIndex(FeatureIndex index);
31:
32: /** Removes the given FeatureIndex from the collection.
33: * @param index The FeatureIndex to remove.
34: * @throws NullPointerException If the index is null.
35: */
36: void removeIndex(FeatureIndex index);
37:
38: /** Removes all indices from this collection. */
39: void removeAllIndices();
40:
41: /** Look up an index by class.
42: * @return The FeatureIndex or null, if none exists.
43: */
44: FeatureIndex getIndex(Class index);
45:
46: /** Get an Iterator containing all of the indices in this collection.
47: * @return An Iterator of the indices.
48: */
49: java.util.Iterator indices();
50:
51: }
|