|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.ioc.util.IdAllocator
public final class IdAllocator
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.
This class is not threadsafe.
Constructor Summary | |
---|---|
IdAllocator()
Creates a new allocator with no namespace. |
|
IdAllocator(String namespace)
Creates a new allocator with the provided namespace. |
Method Summary | |
---|---|
String |
allocateId(String name)
Allocates the id. |
void |
clear()
Clears the allocator, resetting it to freshly allocated state. |
IdAllocator |
clone()
Creates a clone of this IdAllocator instance, copying the allocator's namespace and key map. |
List<String> |
getAllocatedIds()
Returns a list of all allocated ids, sorted alphabetically. |
boolean |
isAllocated(String name)
Checks to see if a given name has been allocated. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IdAllocator()
public IdAllocator(String namespace)
Method Detail |
---|
public List<String> getAllocatedIds()
public IdAllocator clone()
clone
in class Object
public String allocateId(String name)
public boolean isAllocated(String name)
public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |