Class NodeBase

Hierarchy: Object , NodeBase
All Implemented Interfaces: Serializable
Direct Known Subclasses: Root, Node
public abstract class NodeBase
implements Serializable
The base class for nodes in a Quadtree.

Other

  • version: 1.7
public NodeBase()
public static int getSubnodeIndex(Envelope env, double centrex, double centrey)
Gets the index of the subquad that wholly contains the given envelope. If none does, returns -1.
Returns:
the index of the subquad that wholly contains the given envelope or -1 if no subquad wholly contains the envelope
public List getItems()
public boolean hasItems()
public void add(Object item)
public boolean remove(Envelope itemEnv, Object item)
Removes a single item from this subtree.
Parameters:
itemEnv - itemEnv the envelope containing the item
item - item the item to remove
Returns:
true if the item was found and removed
public boolean isPrunable()
public boolean hasChildren()
public boolean isEmpty()
public List addAllItems(List resultItems)
protected abstract abstract boolean isSearchMatch(Envelope searchEnv)
public void addAllItemsFromOverlapping(Envelope searchEnv, List resultItems)
public void visit(Envelope searchEnv, ItemVisitor visitor)