org.jgrapht.io
Class IntegerComponentNameProvider<T>
- java.lang.Object
-
- org.jgrapht.io.IntegerComponentNameProvider<T>
-
- Type Parameters:
T- the component type
- All Implemented Interfaces:
- ComponentNameProvider<T>
- Direct Known Subclasses:
- IntegerComponentNameProvider
public class IntegerComponentNameProvider<T> extends java.lang.Object implements ComponentNameProvider<T>
Assigns a unique integer to represent each component. Each instance of provider maintains an internal map between every component it has ever seen and the unique integer representing that edge. As a result it is probably desirable to have a separate instance for each distinct graph.
-
-
Constructor Summary
Constructors Constructor and Description IntegerComponentNameProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclear()Clears all cached identifiers, and resets the unique identifier counter.java.lang.StringgetName(T component)Returns the string representation of a component.
-
-
-
Method Detail
-
clear
public void clear()
Clears all cached identifiers, and resets the unique identifier counter.
-
getName
public java.lang.String getName(T component)
Returns the string representation of a component.- Specified by:
getNamein interfaceComponentNameProvider<T>- Parameters:
component- the component to be named- Returns:
- the name of the component
-
-
DataMelt 3.0 © DataMelt by jWork.ORG