T
- the type of data which is stored in the Vertices this Edge
attachespublic class DirectedEdge<T> extends Edge<T>
Modifier and Type | Method and Description |
---|---|
DirectedVertex<T> |
getSource()
Gets the source vertex of this edge
|
DirectedVertex<T> |
getTarget()
Gets the target vertex of this edge
|
void |
removeFromGraph()
Removes this component from the graph it is a part of.
|
void |
reverse()
Reverses the direction of this edge
|
void |
setSource(Vertex<T> source)
Sets a different vertex to be the source for this edge
|
void |
setTarget(Vertex<T> target)
Sets a different vertex to be the target for this edge
|
java.lang.String |
toString() |
fromGraph, fromSameGraphAs
public DirectedVertex<T> getSource()
public DirectedVertex<T> getTarget()
public void removeFromGraph()
GraphComponent
removeFromGraph
in class GraphComponent
public void reverse()
public void setSource(Vertex<T> source)
source
- the new sourcepublic void setTarget(Vertex<T> target)
target
- the new targetpublic java.lang.String toString()
toString
in class GraphComponent