org.deken.game.pathfinding
Class NodeLink

java.lang.Object
  extended by org.deken.game.pathfinding.NodeLink
All Implemented Interfaces:
java.lang.Comparable<NodeLink>

public class NodeLink
extends java.lang.Object
implements java.lang.Comparable<NodeLink>

Title: NodeLink

Description: A connect between two nodes. Storing the distance, in Tiles, between the two nodes. The Path, tiles from one the other.

Copyright: Copyright (c) Feb 11, 2012

Version:
1.0
Author:
Gary Deken

Constructor Summary
NodeLink(Node node, int distance, java.util.List<java.lang.String> path)
           
 
Method Summary
 int compareTo(NodeLink other)
           
 int getDistance()
           
 int getDistanceOnPath(int x, int y)
           
 GameLocation getFirstPosition()
           
 GameLocation getLocation(int index)
           
 Node getNode()
           
 java.util.List<java.lang.String> getPath()
           
 boolean isOnPath(int x, int y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeLink

public NodeLink(Node node,
                int distance,
                java.util.List<java.lang.String> path)
Method Detail

getDistance

public int getDistance()

getNode

public Node getNode()

getPath

public java.util.List<java.lang.String> getPath()

isOnPath

public boolean isOnPath(int x,
                        int y)

getDistanceOnPath

public int getDistanceOnPath(int x,
                             int y)

getFirstPosition

public GameLocation getFirstPosition()

getLocation

public GameLocation getLocation(int index)

compareTo

public int compareTo(NodeLink other)
Specified by:
compareTo in interface java.lang.Comparable<NodeLink>