public abstract class Edge extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Edge.ValidVertexTypes |
Modifier and Type | Field and Description |
---|---|
protected Vertex |
fromv |
protected Vertex |
tov |
Modifier | Constructor and Description |
---|---|
protected |
Edge(Vertex v1,
Vertex v2) |
Modifier and Type | Method and Description |
---|---|
double |
getAzimuth()
Returns the azimuth of this edge from head to tail.
|
String |
getDirection()
Get a direction on paths where it matters, or null
|
org.locationtech.jts.geom.LineString |
getDisplayGeometry() |
double |
getDistance() |
Vertex |
getFromVertex() |
org.locationtech.jts.geom.LineString |
getGeometry() |
int |
getId() |
abstract String |
getName()
Gets english localized name
|
abstract String |
getName(Locale locale)
Gets wanted localization
|
Vertex |
getToVertex() |
Trip |
getTrip()
This should only be called inside State; other methods should call
org.opentripplanner.routing.core.State.getBackTrip()
|
Edge.ValidVertexTypes |
getValidVertexTypes() |
boolean |
hasBogusName() |
int |
hashCode() |
boolean |
isEquivalentTo(Edge e)
Checks equivalency to another edge.
|
boolean |
isPartial()
Returns true if this edge is partial - overriden by subclasses.
|
boolean |
isReverseOf(Edge e)
Returns true if this edge is the reverse of another.
|
boolean |
isRoundabout()
Edges are not roundabouts by default.
|
State |
optimisticTraverse(State s0) |
double |
timeLowerBound(RoutingRequest options)
Returns a lower bound on traversal time given the routing options.
|
String |
toString() |
abstract State |
traverse(State s0)
Traverse this edge.
|
boolean |
vertexTypesValid() |
double |
weightLowerBound(RoutingRequest options)
Returns a lower bound on edge weight given the routing options.
|
public Vertex getFromVertex()
public Vertex getToVertex()
public boolean isPartial()
public boolean isEquivalentTo(Edge e)
public boolean isReverseOf(Edge e)
public String getDirection()
public Trip getTrip()
public boolean isRoundabout()
public abstract State traverse(State s0)
s0
- The State coming into the edge.public double weightLowerBound(RoutingRequest options)
options
- public double timeLowerBound(RoutingRequest options)
options
- public abstract String getName()
public abstract String getName(Locale locale)
locale
- wanted localepublic boolean hasBogusName()
public org.locationtech.jts.geom.LineString getGeometry()
public org.locationtech.jts.geom.LineString getDisplayGeometry()
public double getAzimuth()
public double getDistance()
public Edge.ValidVertexTypes getValidVertexTypes()
public final boolean vertexTypesValid()
public int getId()
Copyright © 2019. All rights reserved.