public class AStarClosedListHashMap extends java.lang.Object implements AStarClosedListBase<AStarNode>
Constructor and Description |
---|
AStarClosedListHashMap() |
Modifier and Type | Method and Description |
---|---|
void |
addNodeToClosedList(AStarNode node)
Marks a node as been visited and expanded, which means that his neighbour
nodes have been added to the open list.
|
void |
clearClosedList()
Removes all nodes from the closed list.
|
java.util.Collection<AStarNode> |
dumpClosedList() |
AStarNode |
findClosedNode(int x,
int y,
int z)
If this position has already been visited by the A* search, and its nodes
neighbours have been added to the open list, this method returns the node
associated with the given position.
|
void |
removeNodeFromClosedList(AStarNode node)
If contained in the list of visited and expanded nodes, the given node is
removed.
|
void |
setMap(AStarMapBase<AStarNode> map) |
public void addNodeToClosedList(AStarNode node)
AStarClosedListBase
addNodeToClosedList
in interface AStarClosedListBase<AStarNode>
node
- The node to add.public AStarNode findClosedNode(int x, int y, int z)
AStarClosedListBase
findClosedNode
in interface AStarClosedListBase<AStarNode>
x
- X-position of the map to be checked.y
- Y-position of the map to be checked.z
- Z-position of the map to be checked.null
otherwise.public java.util.Collection<AStarNode> dumpClosedList()
public void removeNodeFromClosedList(AStarNode node)
AStarClosedListBase
removeNodeFromClosedList
in interface AStarClosedListBase<AStarNode>
node
- The node to be removed.public void setMap(AStarMapBase<AStarNode> map)
public void clearClosedList()
AStarClosedListBase
clearClosedList
in interface AStarClosedListBase<AStarNode>