Modifier and Type | Field and Description |
---|---|
protected java.util.List |
items |
protected Node[] |
subnode
subquads are numbered as follows:
|
Constructor and Description |
---|
NodeBase() |
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
hasChildren() |
boolean |
hasItems() |
boolean |
isEmpty() |
boolean |
isPrunable() |
protected abstract boolean |
isSearchMatch(Envelope searchEnv) |
boolean |
remove(Envelope itemEnv,
java.lang.Object item)
Removes a single item from this subtree.
|
void |
visit(Envelope searchEnv,
ItemVisitor visitor) |
protected java.util.List items
protected Node[] subnode
2 | 3 --+-- 0 | 1
public static int getSubnodeIndex(Envelope env, Coordinate centre)
public java.util.List getItems()
public boolean hasItems()
public void add(java.lang.Object item)
public boolean remove(Envelope itemEnv, java.lang.Object item)
searchEnv
- the envelope containing the itemitem
- the item to removetrue
if the item was found and removedpublic boolean isPrunable()
public boolean hasChildren()
public boolean isEmpty()
public java.util.List addAllItems(java.util.List resultItems)
protected abstract boolean isSearchMatch(Envelope searchEnv)
public void addAllItemsFromOverlapping(Envelope searchEnv, java.util.List resultItems)
public void visit(Envelope searchEnv, ItemVisitor visitor)