T
- the type of the data the vertex storespublic abstract class Vertex<T> extends GraphComponent
Modifier and Type | Method and Description |
---|---|
abstract java.util.Set<? extends Vertex<T>> |
getAdjacentVertices()
Gets all the vertices adjacent to this one.
|
T |
getData()
Gets the data currently associated with this vertex
|
abstract java.util.Set<? extends Edge<T>> |
getEdges()
Gets all the edges connected to this vertex.
|
abstract void |
removeAllEdges()
Removes all the edges connected to this vertex from the graph
|
void |
setData(T data)
Sets the data associated with this vertex to a new value
|
java.lang.String |
toString() |
fromGraph, fromSameGraphAs, removeFromGraph
public abstract java.util.Set<? extends Vertex<T>> getAdjacentVertices()
public T getData()
public abstract java.util.Set<? extends Edge<T>> getEdges()
public abstract void removeAllEdges()
public void setData(T data)
data
- the new data valuepublic java.lang.String toString()
toString
in class GraphComponent