Class SequentialdISupplier

java.lang.Object
com.globalmentor.model.SequentialdISupplier
All Implemented Interfaces:
Supplier<String>

public class SequentialdISupplier extends Object implements Supplier<String>
Supplies sequential string identifiers via get(), each guaranteed to be sequentially unique. The identifiers begin with some prefix and end with a sequential number.

This implementation makes no allowance for sequential values past the maximum unsigned value stored in a long.

This class is thread safe.

Author:
Garret Wilson
  • Constructor Details

    • SequentialdISupplier

      public SequentialdISupplier()
      Constructor with no prefix.
    • SequentialdISupplier

      public SequentialdISupplier(@Nonnull String prefix)
      Prefix constructor.
      Parameters:
      prefix - The prefix to use in the generated identifiers.
  • Method Details