public class DirectedEdgeDataVertex<T> extends AbstractVertex implements EdgeDataVertex<T>
Constructor and Description |
---|
DirectedEdgeDataVertex(EdgeDataFactory<T> edgeDataFactory)
Constructor from an EdgeDataFactory
|
Modifier and Type | Method and Description |
---|---|
<V extends Vertex> |
addAdjacency(V 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
|
T |
getEdgeData(EdgeDataVertex<T> to)
Get data for a particular edge.
|
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.
|
equals, getGraph, setGraph
public DirectedEdgeDataVertex(EdgeDataFactory<T> edgeDataFactory)
edgeDataFactory
- factory to use for creating new EdgeData objectspublic <V extends Vertex> boolean addAdjacency(V to)
Vertex
addAdjacency
in interface Vertex
to
- vertex to be addedpublic boolean removeAdjacency(Vertex to)
Vertex
removeAdjacency
in interface Vertex
to
- vertex to be removedpublic void clearAdjacencies()
Vertex
clearAdjacencies
in interface Vertex
public final boolean containsAdjacency(Vertex to)
Vertex
containsAdjacency
in interface Vertex
to
- vertex whose presence is to be testedpublic final int adjacencyCount()
Vertex
adjacencyCount
in interface Vertex
public final java.util.Set<? extends Vertex> getAdjacencies()
Vertex
getAdjacencies
in interface Vertex
public final boolean hasAdjacencies()
Vertex
hasAdjacencies
in interface Vertex
public T getEdgeData(EdgeDataVertex<T> to)
EdgeDataVertex
getEdgeData
in interface EdgeDataVertex<T>
to
- head of the edge for which to retrieve data