org.geotools.index.quadtree
Class LazySearchCollection

java.lang.Object
  extended by java.util.AbstractCollection<Data>
      extended by org.geotools.index.quadtree.LazySearchCollection
All Implemented Interfaces:
java.lang.Iterable<Data>, java.util.Collection<Data>, CloseableCollection<Data>

public class LazySearchCollection
extends java.util.AbstractCollection<Data>
implements CloseableCollection<Data>

A collection that will open and close the QuadTree and find the next id in the index.

Author:
Jesse

Constructor Summary
LazySearchCollection(QuadTree tree, com.vividsolutions.jts.geom.Envelope bounds)
           
 
Method Summary
 void close()
          Close the collection so it cleans up its resources
 void closeIterator(java.util.Iterator<Data> iter)
          Close the collection so it cleans up its resources
 boolean isEmpty()
           
 java.util.Iterator<Data> iterator()
           
 int size()
           
 
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

LazySearchCollection

public LazySearchCollection(QuadTree tree,
                            com.vividsolutions.jts.geom.Envelope bounds)
Method Detail

iterator

public java.util.Iterator<Data> iterator()
Specified by:
iterator in interface java.lang.Iterable<Data>
Specified by:
iterator in interface java.util.Collection<Data>
Specified by:
iterator in class java.util.AbstractCollection<Data>

size

public int size()
Specified by:
size in interface java.util.Collection<Data>
Specified by:
size in class java.util.AbstractCollection<Data>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection<Data>
Overrides:
isEmpty in class java.util.AbstractCollection<Data>

close

public void close()
Description copied from interface: CloseableCollection
Close the collection so it cleans up its resources

Specified by:
close in interface CloseableCollection<Data>

closeIterator

public void closeIterator(java.util.Iterator<Data> iter)
                   throws java.io.IOException
Description copied from interface: CloseableCollection
Close the collection so it cleans up its resources

Specified by:
closeIterator in interface CloseableCollection<Data>
Throws:
java.io.IOException


Copyright © 1996-2010 Geotools. All Rights Reserved.