public abstract class AbstractNodesPositionMatrix
extends java.lang.Object
Constructor and Description |
---|
AbstractNodesPositionMatrix() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
changeNodePosition(Node n,
Position oldPosition,
Position newPosition)
Change the position of a Node wich is located inside a NodeList.
|
abstract AbstractNodesList |
getNodeAt(int x,
int y)
Retrieve a NodeList located at position (x,y).
|
abstract java.util.List<Node> |
possibleNeighbours(Node n,
Position p)
Retrieve a set of Nodes which can be the possible neighbour of the Node n.
|
abstract void |
rebuild(AbstractNodesList nodes)
Rebuild the current NodeMatrix and add the content of nodes
into this new matrix.
|
int |
size() |
public abstract AbstractNodesList getNodeAt(int x, int y)
x
- - the x-position of the NodeListy
- - the y-position of the NodeListpublic abstract boolean changeNodePosition(Node n, Position oldPosition, Position newPosition)
n
- - the node to change its positionoldPosition
- - the old position where the node was locatednewPosition
- - the new position where the node should be storedpublic abstract void rebuild(AbstractNodesList nodes)
nodes
- - the set of NodesList to be added.public abstract java.util.List<Node> possibleNeighbours(Node n, Position p)
n
- - the node whose neighbours should be listedp
- - the current position of the nodepublic int size()