Package ca.spatial.table
Class Node
java.lang.Object
ca.spatial.table.Node
This class represents a Node in a topological network of
connectivity between blocks. There should be a one-to-one
matchup of Blocks to Nodes in a properly described
topology. Use the
Topology
class to find Nodes by
block index number.
Each Node contains a list of Edge
objects. Edge
s
indicate neighbour relationships.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add anEdge
to this Node.boolean
int
getArea()
Get the area of this Node as a scaled integer value.getEdges()
Get the list of sharedEdge
s for this Node.int
getIndex()
Get the index of this Node.getLabel()
Get the node labelboolean
hasEdge(int index)
Test if this Node has an edge relationship to the Node with a specified index value.int
hashCode()
void
setIndex(int index)
-
Constructor Details
-
Node
Create a new Node object.- Parameters:
index
- A unique ID that is usually the same as the index of the feature that this Node represents.area
- The area of this block as a scaled integer.
-
-
Method Details
-
getIndex
public final int getIndex()Get the index of this Node. The index value is the same as the index of the feature that this node represents. -
setIndex
public void setIndex(int index) -
getArea
public final int getArea()Get the area of this Node as a scaled integer value. -
getLabel
Get the node label -
addEdge
Add anEdge
to this Node.- Parameters:
node
- The neighbour Node.length
- The length of shared edge.
-
getEdges
Get the list of sharedEdge
s for this Node. -
hasEdge
public final boolean hasEdge(int index)Test if this Node has an edge relationship to the Node with a specified index value.- Parameters:
index
- The index value of the Node that we are testing for a neighbour relationship to the current Node.
-
equals
-
hashCode
public int hashCode()
-