/** * Test if a property exists. */ public boolean hasProperty(String name) { return properties!=null && properties.containsKey(name); }
/** * Test, if a property is declared. * @param name The property name. * @return True, if the property is declared. */ public boolean hasPropertyValue(String name) { return properties!=null && properties.containsKey(name); }
/** * Test if a prop exists. */ public boolean hasParameter(String name) { return parameters!=null && parameters.containsKey(name); }
/** * Test if an object passes the filter. * @return True, if passes the filter. */ public boolean filter(String obj) { return map != null? map.containsKey(obj): false; } }
/** * Deregister a component description. * @throws RuntimeException when the component is not registered. */ public IFuture<Void> deregister(IDFComponentDescription cdesc) { Future<Void> ret = new Future<Void>(); if(!components.containsKey(cdesc.getName())) { //throw new RuntimeException("Component not registered: "+adesc.getName()); ret.setException(new RuntimeException("Component not registered: "+cdesc.getName())); } else { components.removeKey(cdesc.getName()); ret.setResult(null); //System.out.println("deregistered: "+adesc.getName()); } return ret; }
/** * Deregister a component description. * @throws RuntimeException when the component is not registered. */ public IFuture<Void> deregister(IDFComponentDescription cdesc) { Future<Void> ret = new Future<Void>(); if(!components.containsKey(cdesc.getName())) { //throw new RuntimeException("Component not registered: "+adesc.getName()); ret.setException(new RuntimeException("Component not registered: "+cdesc.getName())); } else { components.removeKey(cdesc.getName()); ret.setResult(null); //System.out.println("deregistered: "+adesc.getName()); } return ret; }
/** * Deregister a component description. * @throws RuntimeException when the component is not registered. */ public IFuture<Void> deregister(IDFComponentDescription cdesc) { Future<Void> ret = new Future<Void>(); synchronized(components) { if(!components.containsKey(cdesc.getName())) { //throw new RuntimeException("Component not registered: "+adesc.getName()); ret.setException(new RuntimeException("Component not registered: "+cdesc.getName())); } else { components.removeKey(cdesc.getName()); ret.setResult(null); //System.out.println("deregistered: "+adesc.getName()); } } return ret; }
if(components.containsKey(clone.getName())) throw new RuntimeException("Component already registered: "+cdesc.getName()); components.add(clone.getName(), clone);
if(components.containsKey(clone.getName())) throw new RuntimeException("Componentomponent already registered: "+cdesc.getName()); components.add(clone.getName(), clone);
if(components.containsKey(clone.getName())) throw new RuntimeException("Componentomponent already registered: "+cdesc.getName()); components.add(clone.getName(), clone);
if(components.containsKey(adesc.getName()))
if(components.containsKey(adesc.getName()))
if(components.containsKey(adesc.getName()))
if(mprops!=null && mprops.containsKey(pmi.getName()))