Class NodeBase

Hierarchy: Object , NodeBase
Direct Known Subclasses: Node, Root
public abstract class NodeBase
The base class for nodes in a Bintree.

Other

  • version: 1.7
public NodeBase()
public static int getSubnodeIndex(Interval interval, double centre)
Returns the index of the subnode that wholely contains the given interval. If none does, returns -1.
public List getItems()
public void add(Object item)
public List addAllItems(List items)
protected abstract abstract boolean isSearchMatch(Interval interval)
public void addAllItemsFromOverlapping(Interval interval, Collection resultItems)
Adds items in the tree which potentially overlap the query interval to the given collection. If the query interval is null, add all items in the tree.
Parameters:
interval - interval a query interval, or null
resultItems - resultItems the candidate items found
public boolean remove(Interval itemInterval, Object item)
Removes a single item from this subtree.
Parameters:
itemInterval - itemInterval the envelope containing the item
item - item the item to remove
Returns:
true if the item was found and removed
public boolean isPrunable()
public boolean hasChildren()
public boolean hasItems()