Class CacheableRoute

java.lang.Object
org.deltava.beans.navdata.CacheableRoute
All Implemented Interfaces:
Serializable, Route, Cacheable

public class CacheableRoute extends Object implements Route
A bean to store a route and its waypoints.
Since:
7.3
Version:
7.3
Author:
Luke
See Also:
  • Constructor Details

    • CacheableRoute

      public CacheableRoute(String route, Collection<NavigationDataBean> waypoints)
      Creates the route.
      Parameters:
      route - the route text
      waypoints - the waypoints
  • Method Details

    • addWaypoint

      public void addWaypoint(NavigationDataBean nd)
      Description copied from interface: Route
      Adds a waypoint to this route.
      Specified by:
      addWaypoint in interface Route
      Parameters:
      nd - the waypoint
    • getWaypoints

      public LinkedList<NavigationDataBean> getWaypoints()
      Description copied from interface: Route
      Returns the waypoints for this Route.
      Specified by:
      getWaypoints in interface Route
      Returns:
      a LinkedList of Intersections
    • getRoute

      public String getRoute()
      Description copied from interface: Route
      Returns the Airway route.
      Specified by:
      getRoute in interface Route
      Returns:
      a space-delimited list of waypoint codes
    • getSize

      public int getSize()
      Description copied from interface: Route
      Returns the number of Waypoints on this Route.
      Specified by:
      getSize in interface Route
      Returns:
      the number of Waypoints
    • cacheKey

      public Object cacheKey()
      Description copied from interface: Cacheable
      Returns the cache key for this object. Caches call this method when adding the object.
      Specified by:
      cacheKey in interface Cacheable
      Returns:
      the cache key for the object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object