public class UndirectedSimpleVertex extends DirectedSimpleVertex
Constructor and Description |
---|
UndirectedSimpleVertex()
Default constructor initializes graph to null and creates an empty adjacency list
|
Modifier and Type | Method and Description |
---|---|
<T extends Vertex> |
addAdjacency(T to)
Adds the specified vertex to the set of adjacencies.
|
void |
clearAdjacencies()
Removes all vertices from the adjacency set.
|
boolean |
removeAdjacency(Vertex to)
Removes the specified vertex from the adjacency set.
|
adjacencyCount, containsAdjacency, getAdjacencies, hasAdjacencies
equals, getGraph, setGraph
public UndirectedSimpleVertex()
public final <T extends Vertex> boolean addAdjacency(T to)
Vertex
addAdjacency
in interface Vertex
addAdjacency
in class DirectedSimpleVertex
to
- vertex to be addedpublic final boolean removeAdjacency(Vertex to)
Vertex
removeAdjacency
in interface Vertex
removeAdjacency
in class DirectedSimpleVertex
to
- vertex to be removedpublic final void clearAdjacencies()
Vertex
clearAdjacencies
in interface Vertex
clearAdjacencies
in class DirectedSimpleVertex