Class AStar.Path

  • All Implemented Interfaces:
    java.lang.Comparable<AStar.Path>
    Enclosing class:
    AStar<T>

    public class AStar.Path
    extends java.lang.Object
    implements java.lang.Comparable<AStar.Path>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.Double f  
      java.lang.Double g  
      AStar.Path parent  
      T point  
    • Constructor Summary

      Constructors 
      Constructor Description
      Path()
      Default c'tor.
      Path​(AStar.Path p)
      C'tor by copy another object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(AStar.Path p)
      Compare to another object using the total cost f.
      T getPoint()
      Get the last point on the path.
      void setPoint​(T p)
      Set the
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • point

        public T point
      • f

        public java.lang.Double f
      • g

        public java.lang.Double g
    • Constructor Detail

      • Path

        public Path()
        Default c'tor.
      • Path

        public Path​(AStar.Path p)
        C'tor by copy another object.
        Parameters:
        p - The path object to clone.
    • Method Detail

      • compareTo

        public int compareTo​(AStar.Path p)
        Compare to another object using the total cost f.
        Specified by:
        compareTo in interface java.lang.Comparable<AStar.Path>
        Parameters:
        p - The object to compare to.
        Returns:
        less than 0 This object is smaller than 0; 0 Object are the same. bigger than 0 This object is bigger than p.
        See Also:
        Comparable#compareTo()
      • getPoint

        public T getPoint()
        Get the last point on the path.
        Returns:
        The last point visited by the path.
      • setPoint

        public void setPoint​(T p)
        Set the