public class UndirectedBfsVertex extends UndirectedSimpleVertex implements BfsVertex
DEFAULT_DISTANCE
Constructor and Description |
---|
UndirectedBfsVertex() |
Modifier and Type | Method and Description |
---|---|
Color |
getColor()
Get the vertex color
|
int |
getDistance()
Get the value of the distance field
|
ChildVertex |
getParent()
Get the vertex's parent
|
void |
setColor(Color color)
Set the vertex color
|
void |
setDistance(int distance)
Set the distance field
|
void |
setParent(ChildVertex parent)
Set the parent of the given vertex
|
addAdjacency, clearAdjacencies, removeAdjacency
adjacencyCount, containsAdjacency, getAdjacencies, hasAdjacencies
equals, getGraph, setGraph
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAdjacency, adjacencyCount, clearAdjacencies, containsAdjacency, getAdjacencies, getGraph, hasAdjacencies, removeAdjacency, setGraph
public void setParent(ChildVertex parent)
ChildVertex
setParent
in interface ChildVertex
parent
- vertex to be set as parentpublic ChildVertex getParent()
ChildVertex
getParent
in interface ChildVertex
public void setColor(Color color)
ColoredVertex
setColor
in interface ColoredVertex
color
- value to which to set the colorpublic Color getColor()
ColoredVertex
getColor
in interface ColoredVertex
public void setDistance(int distance)
DistanceVertex
setDistance
in interface DistanceVertex
distance
- value to which to set the distance fieldpublic int getDistance()
DistanceVertex
getDistance
in interface DistanceVertex