com.vividsolutions.jts.index.quadtree
Class NodeBase

java.lang.Object
  extended bycom.vividsolutions.jts.index.quadtree.NodeBase
Direct Known Subclasses:
Node, Root

public abstract class NodeBase
extends java.lang.Object

The base class for nodes in a Quadtree.

Version:
1.4.0

Field Summary
protected  java.util.List items
           
protected  Node[] subnode
          subquads are numbered as follows:
 
Constructor Summary
NodeBase()
           
 
Method Summary
 void add(java.lang.Object item)
           
 java.util.List addAllItems(java.util.List resultItems)
           
 void addAllItemsFromOverlapping(Envelope searchEnv, java.util.List resultItems)
           
 java.util.List getItems()
           
static int getSubnodeIndex(Envelope env, Coordinate centre)
          Returns the index of the subquad that wholly contains the given envelope.
protected abstract  boolean isSearchMatch(Envelope searchEnv)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

items

protected java.util.List items

subnode

protected Node[] subnode
subquads are numbered as follows:
  2 | 3
  --+--
  0 | 1
 

Constructor Detail

NodeBase

public NodeBase()
Method Detail

getSubnodeIndex

public static int getSubnodeIndex(Envelope env,
                                  Coordinate centre)
Returns the index of the subquad that wholly contains the given envelope. If none does, returns -1.


getItems

public java.util.List getItems()

add

public void add(java.lang.Object item)

addAllItems

public java.util.List addAllItems(java.util.List resultItems)

isSearchMatch

protected abstract boolean isSearchMatch(Envelope searchEnv)

addAllItemsFromOverlapping

public void addAllItemsFromOverlapping(Envelope searchEnv,
                                       java.util.List resultItems)