Package org.jgrapht.ext
Class StringEdgeNameProvider<E>
- java.lang.Object
-
- org.jgrapht.ext.StringEdgeNameProvider<E>
-
- All Implemented Interfaces:
EdgeNameProvider<E>
public class StringEdgeNameProvider<E> extends java.lang.Object implements EdgeNameProvider<E>
Generates edge names by invokingObject.toString()
on them. This assumes that the edge'sObject.toString()
method returns a unique String representation for each edge.- Author:
- Trevor Harmon
-
-
Constructor Summary
Constructors Constructor Description StringEdgeNameProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getEdgeName(E edge)
Returns the String representation an edge.
-
-
-
Method Detail
-
getEdgeName
public java.lang.String getEdgeName(E edge)
Returns the String representation an edge.- Specified by:
getEdgeName
in interfaceEdgeNameProvider<E>
- Parameters:
edge
- the edge to be named- Returns:
- the name of the edge
-
-