public abstract class Vertex extends Object implements Serializable, Cloneable
Modifier | Constructor and Description |
---|---|
protected |
Vertex(Graph g,
String label,
double x,
double y) |
protected |
Vertex(Graph g,
String label,
double x,
double y,
I18NString name) |
Modifier and Type | Method and Description |
---|---|
void |
addIncoming(Edge edge) |
void |
addOutgoing(Edge edge) |
double |
azimuthTo(com.vividsolutions.jts.geom.Coordinate other)
Get the bearing, in degrees, between this vertex and another coordinate.
|
double |
azimuthTo(Vertex other)
Get the bearing, in degrees, between this vertex and another.
|
com.vividsolutions.jts.geom.Coordinate |
getCoordinate() |
int |
getDegreeIn() |
int |
getDegreeOut() |
Collection<Edge> |
getIncoming()
Get a collection containing all the edges leading from other vertices to this vertex.
|
int |
getIndex()
Get this vertex's unique index, that can serve as a hashcode or an index into a table
|
String |
getLabel()
Every vertex has a label which is globally unique.
|
double |
getLat()
Get the latitude of the vertex
|
double |
getLon()
Get the longitude of the vertex
|
static int |
getMaxIndex() |
String |
getName()
If this vertex is located on only one street, get that street's name
in english localization
|
String |
getName(Locale locale)
If this vertex is located on only one street, get that street's name
in provided localization
|
Collection<Edge> |
getOutgoing()
Get a collection containing all the edges leading from this vertex to other vertices.
|
List<Edge> |
getOutgoingStreetEdges() |
double |
getX()
Get the longitude of the vertex
|
double |
getY()
Get the latitude of the vertex
|
int |
hashCode() |
boolean |
removeIncoming(Edge edge) |
boolean |
removeOutgoing(Edge edge) |
void |
setIndex(int index) |
String |
toString() |
protected Vertex(Graph g, String label, double x, double y, I18NString name)
public void addOutgoing(Edge edge)
public boolean removeOutgoing(Edge edge)
public void addIncoming(Edge edge)
public boolean removeIncoming(Edge edge)
public Collection<Edge> getOutgoing()
public Collection<Edge> getIncoming()
public int getDegreeOut()
public int getDegreeIn()
public double getX()
public double getY()
public double getLon()
public double getLat()
public String getName()
public String getName(Locale locale)
locale
- wanted localizationpublic String getLabel()
public com.vividsolutions.jts.geom.Coordinate getCoordinate()
public double azimuthTo(com.vividsolutions.jts.geom.Coordinate other)
public double azimuthTo(Vertex other)
public int getIndex()
public void setIndex(int index)
public static int getMaxIndex()
Copyright © 2018. All rights reserved.