|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--util.IDFactory
collection of string id's; all keys are lowerCase ascii7; createUniqueID() returns a string which is added to this collection length of keys can be limited by setMaxLength()
Field Summary | |
private java.util.Map |
inUse
map of id's in use @see setInUse( Map m ) |
private int |
maxLength
|
Constructor Summary | |
IDFactory()
|
Method Summary | |
void |
addToInUse(java.util.Collection l)
|
void |
addToInUse(java.lang.String s)
|
void |
addToInUse(java.lang.String s,
java.lang.Object o)
|
java.lang.String |
createUniqueID(IDObject io)
create id and set id of id-object |
java.lang.String |
createUniqueID(java.util.Map mapInUse,
java.lang.Object o)
check a string against the keys of a map and return a string value unique to this map |
java.lang.String |
createUniqueID(java.lang.String val)
create string unique in collection |
static void |
doAddToInUse(java.util.Map m,
java.lang.Object o)
add entry with this id-factory key and given object Object could be instance of IDObject; in which case getID() is used for key; otherwise toString() is used; |
java.util.Map |
getInUseMap()
|
int |
getMaxLength()
|
static java.lang.String |
idfKey(java.lang.String s)
translate string to id-factory key: lowercase ascii string |
void |
setInUseMap(java.util.Map m)
|
void |
setMaxLength(int i)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Map inUse
private int maxLength
Constructor Detail |
public IDFactory()
Method Detail |
public void setInUseMap(java.util.Map m)
addToInUse(java.util.Collection)
public java.util.Map getInUseMap()
public void setMaxLength(int i)
public int getMaxLength()
public void addToInUse(java.util.Collection l)
public java.lang.String createUniqueID(java.lang.String val)
public java.lang.String createUniqueID(IDObject io)
public void addToInUse(java.lang.String s)
public void addToInUse(java.lang.String s, java.lang.Object o)
public static void doAddToInUse(java.util.Map m, java.lang.Object o)
Object could be instance of IDObject; in which case getID() is used for key; otherwise toString() is used;
idfKey(java.lang.String)
public static java.lang.String idfKey(java.lang.String s)
public java.lang.String createUniqueID(java.util.Map mapInUse, java.lang.Object o)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |