- java.lang.Object
-
- org.jgrapht.nio.IntegerIdProvider<T>
-
- Type Parameters:
T
- the element type
- All Implemented Interfaces:
java.util.function.Function<T,java.lang.String>
public class IntegerIdProvider<T> extends java.lang.Object implements java.util.function.Function<T,java.lang.String>
Assign a unique integer identifier to a set of elements. Each instance of provider maintains an internal map between every element it has ever seen and the unique integer representing that element.- Author:
- Trevor Harmon
-
-
Constructor Summary
Constructors Constructor Description IntegerIdProvider()
Create a new providerIntegerIdProvider(int nextId)
Create a new provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
apply(T t)
-