protected class AdjacencyListGraph.MyVertex<V> extends AdjacencyListGraph.MyPosition<V> implements Vertex<V>
HashTableMap.HashEntry<K,V>
Modifier and Type | Field and Description |
---|---|
protected PositionList<Edge<E>> |
incEdges
Incidence container of the vertex.
|
protected Position<Vertex<V>> |
loc
Position of the vertex in the vertex container of the graph.
|
elem
Modifier and Type | Method and Description |
---|---|
int |
degree()
Return the degree of a given vertex
|
java.lang.Iterable<Edge<E>> |
incidentEdges()
Returns the incident edges on this vertex.
|
Position<Edge<E>> |
insertIncidence(Edge<E> e)
Inserts an edge into the incidence container of this vertex.
|
Position<Vertex<V>> |
location()
Returns the position of this vertex in the vertex container of
the graph.
|
void |
removeIncidence(Position<Edge<E>> p)
Removes an edge from the incidence container of this vertex.
|
void |
setLocation(Position<Vertex<V>> p)
Sets the position of this vertex in the vertex container of
the graph.
|
java.lang.String |
toString()
Returns a string representation of the element stored at this
vertex.
|
element, setElement
checkKey, entries, findEntry, get, hashValue, isEmpty, keys, put, rehash, remove, size, values
protected PositionList<Edge<E>> incEdges
public int degree()
public java.lang.Iterable<Edge<E>> incidentEdges()
public Position<Edge<E>> insertIncidence(Edge<E> e)
public void removeIncidence(Position<Edge<E>> p)
public Position<Vertex<V>> location()
public void setLocation(Position<Vertex<V>> p)
public java.lang.String toString()
toString
in class java.lang.Object