package schedframe.resources.utils; import java.util.HashMap; import schedframe.resources.ResourceType; public class ResourceIdGenerator { private static HashMap resourceCounter = new HashMap(); public static int getId(String key){ int value = 0; if(resourceCounter.containsKey(key)){ value = resourceCounter.get(key); value++; } resourceCounter.put(key, value); return value; } }