RendererModel implements Serializable, Cloneable { public <T extends IGeneratorParameter<?>> boolean hasParameter(Class<T> param) { return renderingParameters.containsKey(param.getName()); } RendererModel(); List<IGeneratorParameter<?>> getRenderingParameters(); T getParameter(Class<T> param); S getDefault(Class<T> param); void set(Class<T> paramType, U value); S get(Class<T> paramType); void registerParameters(IGenerator<? extends IChemObject> generator); void setSelection(IChemObjectSelection selection); IChemObjectSelection getSelection(); Map<IAtom, IAtom> getMerge(); IAtom getHighlightedAtom(); void setHighlightedAtom(IAtom highlightedAtom); IBond getHighlightedBond(); void setHighlightedBond(IBond highlightedBond); IAtomContainer getClipboardContent(); void setClipboardContent(IAtomContainer content); void addCDKChangeListener(ICDKChangeListener listener); void removeCDKChangeListener(ICDKChangeListener listener); void fireChange(); String getToolTipText(IAtom atom); void setToolTipTextMap(Map<IAtom, String> map); Map<IAtom, String> getToolTipTextMap(); IAtomContainer getExternalSelectedPart(); void setExternalSelectedPart(IAtomContainer externalSelectedPart); boolean getNotification(); boolean hasParameter(Class<T> param); void setNotification(boolean notification);  }
@Test public void testHasParameter() { IGenerator<IChemObject> generator = new IGenerator<IChemObject>() { IGeneratorParameter<Boolean> someParam = new SomeParam(); @Override public List<IGeneratorParameter<?>> getParameters() { return new ArrayList<IGeneratorParameter<?>>() { { add(someParam); } }; } @Override public IRenderingElement generate(IChemObject object, RendererModel model) { return null; } }; RendererModel model = new RendererModel(); Assert.assertFalse(model.hasParameter(SomeParam.class)); model.registerParameters(generator); Assert.assertTrue(model.hasParameter(SomeParam.class)); }