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 243791 2004-02-19 17:38:13Z hlship $
- 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.