Modifier and Type | Field and Description |
---|---|
protected java.util.List |
items |
protected Node[] |
subnode
subnodes are numbered as follows:
0 | 1
|
Constructor and Description |
---|
NodeBase() |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.Object item) |
java.util.List |
addAllItems(java.util.List items) |
void |
addAllItemsFromOverlapping(Interval interval,
java.util.Collection resultItems)
Adds items in the tree which potentially overlap the query interval
to the given collection.
|
java.util.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,
java.lang.Object item)
Removes a single item from this subtree.
|
protected java.util.List items
protected Node[] subnode
public static int getSubnodeIndex(Interval interval, double centre)
public java.util.List getItems()
public void add(java.lang.Object item)
public java.util.List addAllItems(java.util.List items)
protected abstract boolean isSearchMatch(Interval interval)
public void addAllItemsFromOverlapping(Interval interval, java.util.Collection resultItems)
interval
- a query nterval, or nullresultItems
- the candidate items foundpublic boolean remove(Interval itemInterval, java.lang.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()