public interface Vertex
Modifier and Type | Method and Description |
---|---|
<T extends Vertex> |
addAdjacency(T to)
Adds the specified vertex to the set of adjacencies.
|
int |
adjacencyCount()
Returns the number of vertices in the adjacency set
|
void |
clearAdjacencies()
Removes all vertices from the adjacency set.
|
boolean |
containsAdjacency(Vertex to)
Returns true if the adjacency set contains the specified vertex
|
java.util.Set<? extends Vertex> |
getAdjacencies()
Returns a set of all adjacent vertices
|
AbstractGraph<? extends Vertex> |
getGraph()
Returns the graph to which the vertex belongs.
|
boolean |
hasAdjacencies()
Returns true if the vertex is the tail of at least one edge
|
boolean |
removeAdjacency(Vertex to)
Removes the specified vertex from the adjacency set.
|
void |
setGraph(AbstractGraph<? extends Vertex> graph)
Set the graph to which the vertex belongs
|
void setGraph(AbstractGraph<? extends Vertex> graph)
graph
- graph with which the vertex is to be associatedAbstractGraph<? extends Vertex> getGraph()
<T extends Vertex> boolean addAdjacency(T to)
to
- vertex to be addedboolean removeAdjacency(Vertex to)
to
- vertex to be removedvoid clearAdjacencies()
boolean containsAdjacency(Vertex to)
to
- vertex whose presence is to be testedint adjacencyCount()
java.util.Set<? extends Vertex> getAdjacencies()
boolean hasAdjacencies()