public class ResponsePath extends Object
Constructor and Description |
---|
ResponsePath() |
Modifier and Type | Method and Description |
---|---|
ResponsePath |
addDebugInfo(String debugInfo) |
ResponsePath |
addError(Throwable error) |
ResponsePath |
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.
|
List<Integer> |
getPointsOrder() |
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 . |
ResponsePath |
setAscend(double ascend) |
ResponsePath |
setDescend(double descend) |
ResponsePath |
setDescription(List<String> names) |
ResponsePath |
setDistance(double distance) |
void |
setFare(BigDecimal fare) |
void |
setImpossible(boolean impossible) |
void |
setInstructions(InstructionList instructions) |
void |
setNumChanges(int numChanges) |
ResponsePath |
setPoints(PointList points) |
ResponsePath |
setPointsOrder(List<Integer> list) |
ResponsePath |
setRouteWeight(double weight) |
ResponsePath |
setTime(long timeInMillis) |
void |
setWaypoints(PointList wpList)
This method initializes this path with the snapped input points.
|
String |
toString() |
public List<String> getDescription()
public ResponsePath setDescription(List<String> names)
public ResponsePath addDebugInfo(String debugInfo)
public String getDebugInfo()
public ResponsePath setPointsOrder(List<Integer> list)
public PointList getPoints()
public ResponsePath setPoints(PointList points)
public PointList getWaypoints()
public void setWaypoints(PointList wpList)
public double getDistance()
public ResponsePath setDistance(double distance)
public double getAscend()
public ResponsePath setAscend(double ascend)
public double getDescend()
public ResponsePath setDescend(double descend)
public long getTime()
public ResponsePath setTime(long timeInMillis)
public double getRouteWeight()
public ResponsePath 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 ResponsePath addError(Throwable error)
public ResponsePath 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–2020. All rights reserved.