com.vividsolutions.jts.index.bintree

Class NodeBase

Known Direct Subclasses:
Node, Root

public abstract class NodeBase
extends java.lang.Object

The base class for nodes in a Bintree.
Version:
1.6

Field Summary

protected List
items
protected Node[]
subnode
subnodes are numbered as follows: 0 | 1

Constructor Summary

NodeBase()

Method Summary

void
add(Object item)
List
addAllItems(List items)
List
addAllItemsFromOverlapping(Interval interval, Collection resultItems)
List
getItems()
static int
getSubnodeIndex(Interval interval, double centre)
Returns the index of the subnode that wholely contains the given interval.
protected abstract boolean
isSearchMatch(Interval interval)

Field Details

items

protected List items

subnode

protected Node[] subnode
subnodes are numbered as follows: 0 | 1

Constructor Details

NodeBase

public NodeBase()

Method Details

add

public void add(Object item)

addAllItems

public List addAllItems(List items)

addAllItemsFromOverlapping

public List addAllItemsFromOverlapping(Interval interval,
                                       Collection resultItems)

getItems

public List getItems()

getSubnodeIndex

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.

isSearchMatch

protected abstract boolean isSearchMatch(Interval interval)