public class ShortestPathFinder.Node
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<ShortestPathFinder.Node> |
_blocked |
private Point |
_p |
private ShortestPathFinder.Node |
_predecessor |
private float |
_sourceDistance |
Modifier | Constructor and Description |
---|---|
private |
Node(float x,
float y) |
|
Node(Point p) |
Modifier and Type | Method and Description |
---|---|
private boolean |
atEndOfLine(Line theLine)
test if this Node is one of the ends of theLine
|
private void |
block(ShortestPathFinder.Node aNode)
add aNode to list of nodes that are not a neighbour of this Node
|
boolean |
equals(ShortestPathFinder.Node n) |
private float |
getDistance(Point aPoint)
Get the straight line distance from this node to aPoint
|
private Point |
getLocation()
return the location of this node
|
private ShortestPathFinder.Node |
getPredecessor()
get the predecessor of this node in the shortest path from the start
|
private float |
getSourceDistance()
Return the shortest path length to this node from the start node
|
private float |
getX()
get the X coordinate of this node
|
private float |
getY()
get the Y coordinate of the Node
|
boolean |
isBlocked(ShortestPathFinder.Node aNode) |
private void |
setPredecessor(ShortestPathFinder.Node thePredecessor)
set the predecessor of this node in the shortest path from the start
node
|
private void |
setSourceDistance(float theDistance)
Set the distance of this Node from the source
|
java.lang.String |
toString() |
private Point _p
private float _sourceDistance
private ShortestPathFinder.Node _predecessor
public java.util.ArrayList<ShortestPathFinder.Node> _blocked
private boolean atEndOfLine(Line theLine)
theLine
- endpoints to checkprivate void setSourceDistance(float theDistance)
theDistance
- private float getSourceDistance()
private float getDistance(Point aPoint)
aPoint
- private Point getLocation()
private void block(ShortestPathFinder.Node aNode)
aNode
- private void setPredecessor(ShortestPathFinder.Node thePredecessor)
thePredecessor
- private ShortestPathFinder.Node getPredecessor()
private float getX()
private float getY()
public boolean equals(ShortestPathFinder.Node n)
public boolean isBlocked(ShortestPathFinder.Node aNode)
public java.lang.String toString()
toString
in class java.lang.Object