Class IntegerIdProvider<T>

  • Type Parameters:
    T - the element type
    All Implemented Interfaces:
    Function<T,​String>

    public class IntegerIdProvider<T>
    extends Object
    implements Function<T,​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 Detail

      • IntegerIdProvider

        public IntegerIdProvider()
        Create a new provider
      • IntegerIdProvider

        public IntegerIdProvider​(int nextId)
        Create a new provider.
        Parameters:
        nextId - identifier to start from