Changeset 816 for DCWoRMS/trunk/src/schedframe/resources/utils
- Timestamp:
- 02/04/13 04:12:57 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/src/schedframe/resources/utils/ResourceIdGenerator.java
r477 r816 7 7 public class ResourceIdGenerator { 8 8 9 private static HashMap< ResourceType, Integer> resourceCounter = new HashMap<ResourceType, Integer>();9 private static HashMap<String, Integer> resourceCounter = new HashMap<String, Integer>(); 10 10 11 public static int getId( ResourceType type){11 public static int getId(String key){ 12 12 13 13 int value = 0; 14 if(resourceCounter.containsKey( type)){15 value = resourceCounter.get( type);14 if(resourceCounter.containsKey(key)){ 15 value = resourceCounter.get(key); 16 16 value++; 17 17 } 18 resourceCounter.put( type, value);18 resourceCounter.put(key, value); 19 19 return value; 20 20 }
Note: See TracChangeset
for help on using the changeset viewer.