1 31 package org.objectweb.proactive.core.component.xml; 32 33 import java.util.Hashtable ; 34 import java.util.Map ; 35 36 import org.objectweb.fractal.api.Component; 37 38 39 45 public class ComponentsCache { 46 47 private Map componentsTable; 48 49 public ComponentsCache(){ 50 componentsTable = new Hashtable (); 51 } 52 53 public void addComponent(String name, Component component) { 54 55 componentsTable.put(name, component); 56 } 57 58 public Component getComponent(String name) { 59 return (Component)componentsTable.get(name); 60 } 61 62 public boolean containsComponentNamed(String componentName) { 63 return componentsTable.containsKey(componentName); 64 } 65 66 67 } 68 | Popular Tags |