Modifier and Type | Field and Description |
---|---|
protected List |
items |
protected Node[] |
subnode
subnodes are numbered as follows:
0 | 1
|
Constructor and Description |
---|
NodeBase() |
Modifier and Type | Method and Description |
---|---|
void |
add(Object item) |
List |
addAllItems(List items) |
void |
addAllItemsFromOverlapping(Interval interval,
Collection resultItems)
Adds items in the tree which potentially overlap the query interval
to the given collection.
|
List |
getItems() |
static int |
getSubnodeIndex(Interval interval,
double centre)
Returns the index of the subnode that wholely contains the given interval.
|
boolean |
hasChildren() |
boolean |
hasItems() |
boolean |
isPrunable() |
protected abstract boolean |
isSearchMatch(Interval interval) |
boolean |
remove(Interval itemInterval,
Object item)
Removes a single item from this subtree.
|
protected List items
protected Node[] subnode
public static int getSubnodeIndex(Interval interval, double centre)
public List getItems()
public void add(Object item)
protected abstract boolean isSearchMatch(Interval interval)
public void addAllItemsFromOverlapping(Interval interval, Collection resultItems)
interval
- a query nterval, or nullresultItems
- the candidate items foundpublic boolean remove(Interval itemInterval, Object item)
itemInterval
- the envelope containing the itemitem
- the item to removetrue
if the item was found and removedpublic boolean isPrunable()
public boolean hasChildren()
public boolean hasItems()
Copyright © 2016. All rights reserved.