public class Route extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
routeName |
protected ArrayList<RouteSegment> |
segments |
Constructor and Description |
---|
Route()
Private constructor
|
Modifier and Type | Method and Description |
---|---|
RouteSegment |
appendRouteSegment()
Creates and appends a new route segment
|
void |
clear()
Clears the route log.
|
void |
dumpLog()
Dumps the route to the debuglogger
|
double |
getDistance()
This method returns the distance of the route as the sum of segment
distances.
|
RouteSegment |
getFirstSegment()
Returns the first segment of the route
|
RouteSegment |
getLastSegment()
Returns the last segment of the route
|
int |
getMaxLatitude()
Returns the maximum value of the latitude in the log
|
int |
getMaxLongitude()
Returns the maximum value of the longitude in the log
|
int |
getMinLatitude()
Returns the minimum value of the latitude in the log
|
int |
getMinLongitude()
Returns the minimum value of the longitude in the log
|
protected int |
getNumberOfPoints()
Returns the number of points in the route
|
int |
getNumberOfSegments()
Returns the number of segments
|
String |
getRouteName()
This method returns the route name
|
RouteSegment |
getSegment(int index)
Returns segment at given index
|
ArrayList<RouteSegment> |
getSegments()
Returns the array list with segments
|
void |
setRouteName(String name)
Sets the name of the route.
|
protected ArrayList<RouteSegment> segments
protected String routeName
public void clear()
public void setRouteName(String name)
name
- The new namepublic String getRouteName()
public int getNumberOfSegments()
public ArrayList<RouteSegment> getSegments()
public RouteSegment getSegment(int index)
index
- Indexpublic RouteSegment getFirstSegment()
public RouteSegment getLastSegment()
public RouteSegment appendRouteSegment()
public int getMinLatitude()
public int getMaxLatitude()
public int getMinLongitude()
public int getMaxLongitude()
public double getDistance()
public void dumpLog()
protected int getNumberOfPoints()
Copyright © 2023. All rights reserved.