public class ConcurrentNodesPositionHashMap
extends java.lang.Object
Constructor and Description |
---|
ConcurrentNodesPositionHashMap(AbstractNodesList[] nodes) |
Modifier and Type | Method and Description |
---|---|
void |
addNode(Node n)
Add a node to the Map.
|
boolean |
changeNodePosition(Node n,
Position oldPosition,
Position newPosition)
Changes the node position inside the Hash.
|
java.util.List<Node> |
possibleNeighbours(Node n,
Position p) |
public ConcurrentNodesPositionHashMap(AbstractNodesList[] nodes)
public void addNode(Node n)
n
- - the node to be addedpublic boolean changeNodePosition(Node n, Position oldPosition, Position newPosition)
n
- - the node which position may change.oldPosition
- - the node's old positionnewPosition
- - the node's new position