public abstract class AbstractNode extends Object implements Boundable, Serializable
AbstractSTRtree. A node is one of:
AbstractNodes
ItemBoundables).
| Constructor and Description |
|---|
AbstractNode()
Default constructor required for serialization.
|
AbstractNode(int level)
Constructs an AbstractNode at the given level in the tree
|
| Modifier and Type | Method and Description |
|---|---|
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()
Gets the bounds of this node
|
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
|
boolean |
isEmpty()
Tests whether there are any
Boundables at this node. |
int |
size()
Gets the count of the
Boundables at this node. |
public AbstractNode()
public AbstractNode(int 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 levelpublic void addChildBoundable(Boundable childBoundable)
protected abstract Object computeBounds()
AbstractSTRtree.IntersectsOppublic Object getBounds()
public List getChildBoundables()
AbstractNodes, or if this is a leaf node, real data (wrapped
in ItemBoundables).public int getLevel()
public boolean isEmpty()
Boundables at this node.public int size()
Boundables at this node.Copyright © 2015 Revolution Systems Inc.. All rights reserved.