public abstract class NodeBase extends Object implements 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 item) |
List |
addAllItems(List resultItems) |
void |
addAllItemsFromOverlapping(Envelope searchEnv,
List resultItems) |
List |
getItems() |
static int |
getSubnodeIndex(Envelope env,
double centrex,
double centrey)
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 searchEnv) |
boolean |
remove(Envelope itemEnv,
Object item)
Removes a single item from this subtree.
|
void |
visit(Envelope searchEnv,
ItemVisitor visitor) |
protected List items
protected Node[] subnode
2 | 3 --+-- 0 | 1
public static int getSubnodeIndex(Envelope env, double centrex, double centrey)
public List getItems()
public boolean hasItems()
public void add(Object item)
public boolean remove(Envelope itemEnv, Object item)
itemEnv
- the envelope containing the itemitem
- the item to removetrue
if the item was found and removedpublic boolean isPrunable()
public boolean hasChildren()
public boolean isEmpty()
protected abstract boolean isSearchMatch(Envelope searchEnv)
public void addAllItemsFromOverlapping(Envelope searchEnv, List resultItems)
public void visit(Envelope searchEnv, ItemVisitor visitor)
Copyright © 2016. All rights reserved.