Class AbstractNode

Hierarchy: Object , AbstractNode
All Implemented Interfaces: Boundable, Serializable
Direct Known Subclasses: STRtree.STRtreeNode
public abstract class AbstractNode
implements Serializable , Boundable
A node of an AbstractSTRtree. A node is one of: A node stores the bounds of its children, and its level within the index tree.

Other

  • version: 1.7
public AbstractNode()
Default constructor required for serialization.
public AbstractNode(int level)
Constructs an AbstractNode at the given level in the tree
Parameters:
level - 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
public List getChildBoundables()
Returns either child AbstractNodes, or if this is a leaf node, real data (wrapped in ItemBoundables).
Returns:
a list of the children
protected abstract 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.
See also:
AbstractSTRtree.IntersectsOp
Returns:
an Envelope (for STRtrees), an Interval (for SIRtrees), or other object (for other subclasses of AbstractSTRtree)
public Object getBounds()
Gets the bounds of this node
Returns:
the object representing bounds in this index
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
Returns:
the node level
public int size()
Gets the count of the Boundables at this node.
Returns:
the count of boundables at this node
public boolean isEmpty()
Tests whether there are any Boundables at this node.
Returns:
true if there are boundables at this node
public void addChildBoundable(Boundable childBoundable)
Adds either an AbstractNode, or if this is a leaf node, a data object (wrapped in an ItemBoundable)
Parameters:
childBoundable - childBoundable the child to add