|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.common.UniqueName
public class UniqueName
This class implements a unique name generator.
$Id: UniqueName.java,v 1.17 2007-01-04 16:58:39 burrill Exp $
Copyright 2006 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
Constructor Summary | |
---|---|
UniqueName(java.lang.String seed)
|
Method Summary | |
---|---|
java.lang.String |
genName()
Return a unique name. |
java.lang.String |
getNextName()
Return the next name that will be generated. |
int |
getNextNumber()
Return the next number that will be used in the next generated name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UniqueName(java.lang.String seed)
seed
- the name prefix to be used for generated names.Method Detail |
---|
public java.lang.String genName()
pppnnnn
where ppp
is the seed specified when the UniqueName
object was created and nnn
is a unique integer.
public java.lang.String getNextName()
genName
.
public int getNextNumber()
genName
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |