org.marketcetera.ors.info
Class NameGenerator
java.lang.Object
org.marketcetera.ors.info.NameGenerator
public class NameGenerator
- extends Object
A generator of unique names comprising a prefix, a separator, and a
monotonically increasing integer. Uniqueness is guaranteed only in
the context of the current process and provided no more than Integer.MAX_VALUE names are generated.
- Since:
- 2.0.0
- Version:
- $Id: NameGenerator.java 16154 2012-07-14 16:34:05Z colin $
- Author:
- tlerios@marketcetera.com
|
Constructor Summary |
NameGenerator(String prefix)
Creates a new name generator that uses the given prefix. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INT_SEPARATOR
public static final String INT_SEPARATOR
- The separator between the prefix and the integer.
- See Also:
- Constant Field Values
NameGenerator
public NameGenerator(String prefix)
- Creates a new name generator that uses the given prefix.
- Parameters:
prefix - The prefix.
getNextName
public String getNextName()
- Returns the receiver's next generated name.
- Returns:
- The name.
Copyright © 2012. All Rights Reserved.