public class PathWrapper extends Object
| Constructor and Description |
|---|
PathWrapper() |
| Modifier and Type | Method and Description |
|---|---|
PathWrapper |
addDebugInfo(String debugInfo) |
PathWrapper |
addError(Throwable error) |
PathWrapper |
addErrors(List<Throwable> errors) |
void |
addPathDetails(Map<String,List<PathDetail>> details)
Adds the given PathDetails to the existing ones.
|
BBox |
calcBBox2D()
Calculates the 2D bounding box of this route
|
double |
getAscend()
This method returns the total elevation change (going upwards) in meter.
|
String |
getDebugInfo() |
double |
getDescend()
This method returns the total elevation change (going downwards) in meter.
|
List<String> |
getDescription() |
double |
getDistance()
This method returns the distance of the path.
|
List<Throwable> |
getErrors() |
BigDecimal |
getFare() |
InstructionList |
getInstructions() |
List<Trip.Leg> |
getLegs() |
int |
getNumChanges() |
Map<String,List<PathDetail>> |
getPathDetails() |
PointList |
getPoints()
This method returns all points on the path.
|
double |
getRouteWeight()
This method returns a double value which is better than the time for comparison of routes but
only if you know what you are doing, e.g.
|
long |
getTime() |
PointList |
getWaypoints()
This method returns the input points snapped to the road network.
|
boolean |
hasErrors() |
boolean |
isImpossible() |
static void |
merge(List<PathDetail> pathDetails,
List<PathDetail> otherDetails)
Merges
otherDetails into the pathDetails. |
PathWrapper |
setAscend(double ascend) |
PathWrapper |
setDescend(double descend) |
PathWrapper |
setDescription(List<String> names) |
PathWrapper |
setDistance(double distance) |
void |
setFare(BigDecimal fare) |
void |
setImpossible(boolean impossible) |
void |
setInstructions(InstructionList instructions) |
void |
setNumChanges(int numChanges) |
PathWrapper |
setPoints(PointList points) |
PathWrapper |
setRouteWeight(double weight) |
PathWrapper |
setTime(long timeInMillis) |
void |
setWaypoints(PointList wpList)
This method initializes this path with the snapped input points.
|
String |
toString() |
public List<String> getDescription()
public PathWrapper setDescription(List<String> names)
public PathWrapper addDebugInfo(String debugInfo)
public String getDebugInfo()
public PointList getPoints()
public PathWrapper setPoints(PointList points)
public PointList getWaypoints()
public void setWaypoints(PointList wpList)
public double getDistance()
public PathWrapper setDistance(double distance)
public double getAscend()
public PathWrapper setAscend(double ascend)
public double getDescend()
public PathWrapper setDescend(double descend)
public long getTime()
public PathWrapper setTime(long timeInMillis)
public double getRouteWeight()
public PathWrapper setRouteWeight(double weight)
public BBox calcBBox2D()
public InstructionList getInstructions()
public void setInstructions(InstructionList instructions)
public void addPathDetails(Map<String,List<PathDetail>> details)
details.details - The PathDetails to addpublic static void merge(List<PathDetail> pathDetails, List<PathDetail> otherDetails)
otherDetails into the pathDetails.
This method makes sure that Entry list around via points are merged correctly. See #1091 and the misplaced PathDetail after waypoints.
public Map<String,List<PathDetail>> getPathDetails()
public boolean hasErrors()
public PathWrapper addError(Throwable error)
public PathWrapper addErrors(List<Throwable> errors)
public void setNumChanges(int numChanges)
public int getNumChanges()
public void setFare(BigDecimal fare)
public BigDecimal getFare()
public boolean isImpossible()
public void setImpossible(boolean impossible)
Copyright © 2012–2019. All rights reserved.