de.monarchy.guideme.util
Class RoutePoint

java.lang.Object
  extended by de.monarchy.guideme.util.GeoCoordinate
      extended by de.monarchy.guideme.util.PointOfInterest
          extended by de.monarchy.guideme.util.RoutePoint
All Implemented Interfaces:
POI, java.io.Serializable

public class RoutePoint
extends PointOfInterest

RoutePoint is a special type of POI. It represents routing information about turning points and similar. In addition to position and description, it also holds information about the distance to the next point.

Author:
dstuerze
See Also:
Serialized Form

Field Summary
 
Fields inherited from class de.monarchy.guideme.util.GeoCoordinate
DEG_TO_RAD, EARTH_RADIUS, RAD_TO_DEG
 
Constructor Summary
RoutePoint(double lat, double lon, java.lang.String descr, double dist)
          Creates a new route point with the given information.
RoutePoint(GeoCoordinate gc, java.lang.String descr, double dist)
          Creates a new route point with the given information.
 
Method Summary
 double getDistance()
          Returns the distance to the next route point.
 
Methods inherited from class de.monarchy.guideme.util.PointOfInterest
equals, getDescription, getLocation, getView, hashCode
 
Methods inherited from class de.monarchy.guideme.util.GeoCoordinate
distanceTo, getLatitude, getLongitude, setLatitude, setLongitude, toString, trackAngle
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.monarchy.guideme.util.POI
getLatitude, getLongitude
 

Constructor Detail

RoutePoint

public RoutePoint(double lat,
                  double lon,
                  java.lang.String descr,
                  double dist)
Creates a new route point with the given information. As every POI, it needs a location and description. Additionally, it holds information about the distance to the next POI on the route. The description can be used for instructions.

Parameters:
lat - latitude of the location
lon - longitude of the location
descr - description
dist - distance to next point, >= 0.
Throws:
java.lang.IllegalArgumentException - if dist < 0.

RoutePoint

public RoutePoint(GeoCoordinate gc,
                  java.lang.String descr,
                  double dist)
Creates a new route point with the given information. As every POI, it needs a location and description. Additionally, it holds information about the distance to the next POI on the route. The description can be used for instructions.

Parameters:
gc - location
descr - description
dist - distance to next point, >= 0.
Throws:
java.lang.IllegalArgumentException - if dist < 0.
Method Detail

getDistance

public double getDistance()
Returns the distance to the next route point.

Returns:
distance to next route point