Package oracle.spatial.network
Interface TreeNode
-
- All Superinterfaces:
java.lang.Cloneable
,java.lang.Comparable
,java.io.Serializable
public interface TreeNode extends java.lang.Cloneable, java.io.Serializable, java.lang.Comparable
This interface defines a tree node for trace-out. The nodes of the tree can either be network nodes or virtual nodes on network links.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addChildNode(TreeLink tLink, TreeNode tNode)
Adds a child tree node to current tree nodeTreeNode[]
getChildNodeArray()
Returns the child tree node in an arraydouble
getCost()
Returns the cost from root nodeint
getDepth()
Returns the depth of the node form root.double
getDuration()
Returns the sum of duration from root to this tree nodeJGeometry
getGeometry()
Returns the geometry of the tree nodeLink
getLink()
Returns the link and percentage on the link if the tree node is a node on the link isNodeOnLink() == trueNode
getNode()
If the node is a regular node (not a node on a link)TreeNode
getParentNode()
Returns the parent tree nodedouble
getPercentage()
Returns the link and percentage on the link if the tree node is a node on the link isNodeOnLink() == trueTreeLink
getTreeLink()
Returns the tree link that leads to this tree nodeboolean
isLeafNode()
Returns the tree link array that leads to the child nodes i-th tree link leads to i-th child tree node public TreeLink getTreeLink() ; /** Is the node a leaf node?boolean
isNodeOnLink()
Check whether this node is on a link.boolean
isRegularNode()
Returns the regular node if the tree node is a regular node isNodeOnLink() == false
-
-
-
Method Detail
-
getParentNode
TreeNode getParentNode()
Returns the parent tree node
-
getChildNodeArray
TreeNode[] getChildNodeArray()
Returns the child tree node in an array
-
isLeafNode
boolean isLeafNode()
Returns the tree link array that leads to the child nodes i-th tree link leads to i-th child tree node public TreeLink getTreeLink() ; /** Is the node a leaf node?
-
isNodeOnLink
boolean isNodeOnLink()
Check whether this node is on a link. A tree node can either be a regular node or a node on a link
-
isRegularNode
boolean isRegularNode()
Returns the regular node if the tree node is a regular node isNodeOnLink() == false
-
getNode
Node getNode()
If the node is a regular node (not a node on a link)
-
getLink
Link getLink()
Returns the link and percentage on the link if the tree node is a node on the link isNodeOnLink() == true
-
getPercentage
double getPercentage()
Returns the link and percentage on the link if the tree node is a node on the link isNodeOnLink() == true
-
addChildNode
void addChildNode(TreeLink tLink, TreeNode tNode)
Adds a child tree node to current tree node
-
getDepth
int getDepth()
Returns the depth of the node form root. Root has depth 0
-
getCost
double getCost()
Returns the cost from root node
-
getTreeLink
TreeLink getTreeLink()
Returns the tree link that leads to this tree node
-
getGeometry
JGeometry getGeometry()
Returns the geometry of the tree node
-
getDuration
double getDuration()
Returns the sum of duration from root to this tree node- Returns:
- sum of duration
-
-