public class SimpleVertex extends Vertex<SimpleVertex>
Constructor and Description |
---|
SimpleVertex(int index)
Creates a vertex with the specified index which also specifies its name.
|
SimpleVertex(int index,
String name)
Creates a vertex with the specified index and name.
|
SimpleVertex(int index,
String name,
SimpleVertex[] adjacency)
Creates a vertex with the specified name, index, and adjacency list.
|
SimpleVertex(String name)
Creates a vertex with the specified name.
|
Modifier and Type | Method and Description |
---|---|
SimpleVertex |
copy()
Creates and returns a copy of this object.
|
String |
toString() |
getAdjacency, getDistance, getIndex, getName, getPredecessor, isInProcess, isMarked, mark, setAdjacency, setDistance, setIndex, setInProcess, setMarked, setName, setPredecessor
public SimpleVertex(int index)
index
- the index of this vertexpublic SimpleVertex(String name)
name
- the name of this vertexpublic SimpleVertex(int index, String name)
name
- the name of this vertexindex
- the index of this vertexpublic SimpleVertex(int index, String name, SimpleVertex[] adjacency)
name
- the name of this vertexindex
- the index of this vertexadjacency
- the adjacency of this vertexpublic SimpleVertex copy()
x.clone() != x
is true,.copy
in interface Vertible<SimpleVertex>
copy
in class Vertex<SimpleVertex>
public String toString()
toString
in class Vertex<SimpleVertex>