|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.keridwen.modelling.group.editor.utils.DefaultUniqueIdGenerator
public class DefaultUniqueIdGenerator
Single/ unique id generator. Ids can be not contiguous. This class is a singleton and can be instantiated only one time.
Field Summary | |
---|---|
HashMap<String,Integer> |
loadedCharacteristicIds
|
Method Summary | |
---|---|
int |
getCurrentCharacteristicId()
Return the current maximum Id of Characteristics |
int |
getCurrentPropertyId()
Return the current maximum Id of Properties |
static DefaultUniqueIdGenerator |
getInstanceOf()
Return the singleton of the DefaultUniqueIdGenerator. |
int |
incrementAndGetCharacteristicId()
Get a new id, incremented on one and add it in the list. |
int |
incrementAndGetCharacteristicId(int increment)
Get a new id, incremented on one and add it in the list. |
int |
incrementAndGetPropertyId()
Get a new id, incremented on one and add it in the list. |
int |
incrementAndGetPropertyId(int increment)
Get a new id, incremented on one and add it in the list. |
boolean |
tryToAddCharacteristicId(int id)
|
boolean |
tryToAddPropertyId(int id)
If the id list does not contains the given Id, the present method tries to add it into the id list or return false otherwise. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public HashMap<String,Integer> loadedCharacteristicIds
Method Detail |
---|
public static DefaultUniqueIdGenerator getInstanceOf()
public int getCurrentPropertyId()
public int getCurrentCharacteristicId()
public int incrementAndGetPropertyId()
public int incrementAndGetCharacteristicId()
public int incrementAndGetPropertyId(int increment)
increment
- - increment for the new id w.r.p the current Id.
public int incrementAndGetCharacteristicId(int increment)
increment
- - increment for the new id w.r.p the current Id.
public boolean tryToAddPropertyId(int id)
id
- - Given input id.
public boolean tryToAddCharacteristicId(int id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |