public abstract class NodeBase extends Objectimplements Serializable
Quadtree.
| Modifier and Type | Field and Description |
|---|---|
protected List |
items
|
protected Node |
subnode
subquads are numbered as follows:
|
| Constructor and Description |
|---|
NodeBase()
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Object
|
List |
addAllItems(List
|
void |
addAllItemsFromOverlapping(Envelope
|
List |
getItems()
|
static int |
getSubnodeIndex(Envelope
Gets the index of the subquad that wholly contains the given envelope.
|
boolean |
hasChildren()
|
boolean |
hasItems()
|
boolean |
isEmpty()
|
boolean |
isPrunable()
|
protected abstract boolean |
isSearchMatch(Envelope
|
boolean |
remove(Envelope
Removes a single item from this subtree.
|
void |
visit(Envelope
|
protected Listitems
protected Node[] subnode
2 | 3 --+-- 0 | 1
public static int getSubnodeIndex(Envelopeenv, double centrex, double centrey)
public ListgetItems()
public boolean hasItems()
public void add(Objectitem)
public boolean remove(EnvelopeitemEnv, Object item)
itemEnv - the envelope containing the item
item - the item to remove
true if the item was found and removed
public boolean isPrunable()
public boolean hasChildren()
public boolean isEmpty()
protected abstract boolean isSearchMatch(EnvelopesearchEnv)
public void addAllItemsFromOverlapping(EnvelopesearchEnv, List resultItems)
public void visit(EnvelopesearchEnv, ItemVisitor visitor)