de.monarchy.guideme.util
Class RoutePoint
java.lang.Object
de.monarchy.guideme.util.GeoCoordinate
de.monarchy.guideme.util.PointOfInterest
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
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 java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
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 locationlon
- longitude of the locationdescr
- descriptiondist
- 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
- locationdescr
- descriptiondist
- distance to next point, >= 0.
- Throws:
java.lang.IllegalArgumentException
- if dist < 0.
getDistance
public double getDistance()
- Returns the distance to the next route point.
- Returns:
- distance to next route point