Constructor and Description |
---|
Storage() |
Modifier and Type | Method and Description |
---|---|
void |
addToOpen(Node node)
Adds the given node to the open list
|
boolean |
contains(int x,
int y,
int z) |
void |
decreaseCost(Node node,
int newCost)
Updates the node's cost attribute and notifies the open list of it
|
void |
freeNodes(ObjectPool<Node> pool)
Returns the nodes contained to the given pool
|
Node |
get(int x,
int y,
int z) |
Storage |
getTail()
Returns the next item of the linked list
|
void |
initialize(int width,
int height,
int layers)
Ensures the storage is set to the initial state
|
boolean |
isNodeInOpen(Node node) |
boolean |
isOpenEmpty() |
void |
setTail(Storage tail)
Sets the next linked list item
|
Node |
shiftCheapestNode()
Moves the cheapest node from open list to closed list and returns it
|
public void initialize(int width, int height, int layers)
public void addToOpen(Node node)
public Node shiftCheapestNode()
public boolean isOpenEmpty()
public boolean contains(int x, int y, int z)
public Node get(int x, int y, int z)
public boolean isNodeInOpen(Node node)
public void decreaseCost(Node node, int newCost)
public void freeNodes(ObjectPool<Node> pool)
public Storage getTail()
Poolable