java.lang.Object
com.adventure.models.nodes.IdManager
Class used to generated unique ids.
-
Method Details
-
getInstance
Instance getter for the singleton- Returns:
- current instance
-
getNext
public int getNext()Gets counter value and automatically increments it.- Returns:
- Counter value
-
resetCounter
public void resetCounter()Resets the counter. -
check
public void check(int ID) If the ID > than ID counter sets ID counter to ID + 1- Parameters:
ID
- Value to set.
-