Class PointQuadTree

  • All Implemented Interfaces:

    
    public final class PointQuadTree<T extends PointQuadTree.Item>
    
                        

    A quad tree which tracks items with a Point geometry. See http://en.wikipedia.org/wiki/Quadtree for details on the data structure. This class is not thread safe.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public interface PointQuadTree.Item
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit add(T item) Insert an item.
      final Boolean remove(T item) Remove the given item from the set.
      final Unit clear() Removes all points from the quadTree
      final Collection<T> search(Bounds searchBounds) Search for all items within a given bounds.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • add

         final Unit add(T item)

        Insert an item.

      • remove

         final Boolean remove(T item)

        Remove the given item from the set.

        Returns:

        whether the item was removed.

      • clear

         final Unit clear()

        Removes all points from the quadTree