com.vividsolutions.jts.index.strtree
Class AbstractNode
java.lang.Object
com.vividsolutions.jts.index.strtree.AbstractNode
- Boundable
public abstract class AbstractNode
extends java.lang.Object
A node of the STR tree. The children of this node are either more nodes
(AbstractNodes) or real data (ItemBoundables). If this node contains real data
(rather than nodes), then we say that this node is a "leaf node".
AbstractNode(int level) - Constructs an AbstractNode at the given level in the tree
|
void | addChildBoundable(Boundable childBoundable) - Adds either an AbstractNode, or if this is a leaf node, a data object
(wrapped in an ItemBoundable)
|
protected abstract Object | computeBounds() - Returns a representation of space that encloses this Boundable,
preferably not much bigger than this Boundable's boundary yet fast to
test for intersection with the bounds of other Boundables.
|
Object | getBounds() - Returns a representation of space that encloses this Boundable, preferably
not much bigger than this Boundable's boundary yet fast to test for intersection
with the bounds of other Boundables.
|
List | getChildBoundables() - Returns either child AbstractNodes, or if this is a leaf node, real data (wrapped
in ItemBoundables).
|
int | getLevel() - Returns 0 if this node is a leaf, 1 if a parent of a leaf, and so on; the
root node will have the highest level
|
AbstractNode
public AbstractNode(int level)
Constructs an AbstractNode at the given level in the tree
level
- 0 if this node is a leaf, 1 if a parent of a leaf, and so on; the
root node will have the highest level
addChildBoundable
public void addChildBoundable(Boundable childBoundable)
Adds either an AbstractNode, or if this is a leaf node, a data object
(wrapped in an ItemBoundable)
computeBounds
protected abstract Object computeBounds()
Returns a representation of space that encloses this Boundable,
preferably not much bigger than this Boundable's boundary yet fast to
test for intersection with the bounds of other Boundables. The class of
object returned depends on the subclass of AbstractSTRtree.
- an Envelope (for STRtrees), an Interval (for SIRtrees), or other
object (for other subclasses of AbstractSTRtree)
getBounds
public Object getBounds()
Returns a representation of space that encloses this Boundable, preferably
not much bigger than this Boundable's boundary yet fast to test for intersection
with the bounds of other Boundables. The class of object returned depends
on the subclass of AbstractSTRtree.
- getBounds in interface Boundable
- an Envelope (for STRtrees), an Interval (for SIRtrees), or other object
(for other subclasses of AbstractSTRtree)
getChildBoundables
public List getChildBoundables()
Returns either child AbstractNodes, or if this is a leaf node, real data (wrapped
in ItemBoundables).
getLevel
public int getLevel()
Returns 0 if this node is a leaf, 1 if a parent of a leaf, and so on; the
root node will have the highest level