org.grinvin.graphs
Class DefaultVertex
java.lang.Object
org.grinvin.graphs.DefaultVertex
- Element, Vertex
public class DefaultVertex
extends java.lang.Object
Default implementation of
Vertex
.
getIndex
public int getIndex()
Return the current index of this vertex. This index represents a sequence
number in the set of vertices of the graph to which this vertex belongs.
The index lies in the range 0..n-1, where n denotes the total number of vertices
of the graph.
The index of a vertex may change when other vertices
are removed from its parent graph. A vertex which is itself removed from its graph
keeps its index.
- getIndex in interface Vertex