org.apache.tapestry.util
Class IdAllocator
java.lang.Object
|
+--org.apache.tapestry.util.IdAllocator
- public class IdAllocator
- extends Object
Used to "uniquify" names within a given context. A base name
is passed in, and the return value is the base name, or the base name
extended with a suffix to make it unique.
- Since:
- 3.0
- Version:
- $Id: IdAllocator.java,v 1.4 2004/01/19 21:32:17 hlship Exp $
- Author:
- Howard Lewis Ship
Method Summary |
String |
allocateId(String name)
Allocates the id. |
void |
clear()
Clears the allocator, resetting it to freshly allocated state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IdAllocator
public IdAllocator()
allocateId
public String allocateId(String name)
- Allocates the id. Repeated calls for the same name will return
"name", "name_0", "name_1", etc.
clear
public void clear()
- Clears the allocator, resetting it to freshly allocated state.