Closed SuperSimpleGuy closed 11 years ago
Should be:
public int getNextFreeId(String key) { if (!identities.containsKey(key)) { return 0; //This shouldn't be -1, as zero is technically the next free id. } int temp = identities.get(key); identities.put(key, temp + 1); return temp; }
Should be: