1 11 package org.eclipse.osgi.internal.module; 12 13 import java.util.ArrayList ; 14 import java.util.HashMap ; 15 16 public class CyclicDependencyHashMap { 17 private HashMap internal = new HashMap (); 18 19 Object put(ResolverBundle dependentOn, ResolverBundle module) { 21 ArrayList existing = (ArrayList ) internal.get(dependentOn); 22 if (existing == null) { 23 ArrayList v = new ArrayList (); 24 v.add(module); 25 internal.put(dependentOn, v); 26 } else { 27 if (!existing.contains(module)) { 28 existing.add(module); 29 } 30 } 31 return null; 32 } 33 34 ArrayList remove(ResolverBundle dependentOn) { 35 return (ArrayList ) internal.remove((Object ) dependentOn); 36 } 37 } 38 | Popular Tags |