Package org.jgrapht.ext
Class StringNameProvider<V>
- java.lang.Object
-
- org.jgrapht.ext.StringNameProvider<V>
-
- All Implemented Interfaces:
VertexNameProvider<V>
public class StringNameProvider<V> extends java.lang.Object implements VertexNameProvider<V>
Generates vertex names by invokingObject.toString()
on them. This assumes that the vertex'sObject.toString()
method returns a unique String representation for each vertex.- Author:
- Charles Fry
-
-
Constructor Summary
Constructors Constructor Description StringNameProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getVertexName(V vertex)
Returns the String representation of the unique integer representing a vertex.
-
-
-
Method Detail
-
getVertexName
public java.lang.String getVertexName(V vertex)
Returns the String representation of the unique integer representing a vertex.- Specified by:
getVertexName
in interfaceVertexNameProvider<V>
- Parameters:
vertex
- the vertex to be named- Returns:
- the name of
- See Also:
GraphListener.edgeAdded(GraphEdgeChangeEvent)
-
-