/** * Sets the coefficient of a a product to a given value. * * @param product Product for which the coefficient is set * @param coefficient The new coefficient for the given product * @return true if Molecule has been found and stoichiometry has been set. * @see #getProductCoefficient */ @Override public boolean setProductCoefficient(IAtomContainer product, Double coefficient) { boolean result = products.setMultiplier(product, coefficient); return result; }
/** * Sets the coefficient of a a reactant to a given value. * * @param reactant Reactant for which the coefficient is set * @param coefficient The new coefficient for the given reactant * @return true if Molecule has been found and stoichiometry has been set. * @see #getReactantCoefficient */ @Override public boolean setReactantCoefficient(IAtomContainer reactant, Double coefficient) { boolean result = reactants.setMultiplier(reactant, coefficient); return result; }
/** * Sets the coefficient of a a product to a given value. * * @param product Product for which the coefficient is set * @param coefficient The new coefficient for the given product * @return true if Molecule has been found and stoichiometry has been set. * @see #getProductCoefficient */ @Override public boolean setProductCoefficient(IAtomContainer product, Double coefficient) { boolean result = products.setMultiplier(product, coefficient); return result; }
/** * Sets the coefficient of a a reactant to a given value. * * @param reactant Reactant for which the coefficient is set * @param coefficient The new coefficient for the given reactant * @return true if Molecule has been found and stoichiometry has been set. * @see #getReactantCoefficient */ @Override public boolean setReactantCoefficient(IAtomContainer reactant, Double coefficient) { boolean result = reactants.setMultiplier(reactant, coefficient); return result; }
/** * Sets the coefficient of a a reactant to a given value. * * @param reactant Reactant for which the coefficient is set * @param coefficient The new coefficient for the given reactant * @return true if Molecule has been found and stoichiometry has been set. * @see #getReactantCoefficient */ @Override public boolean setReactantCoefficient(IAtomContainer reactant, Double coefficient) { boolean result = reactants.setMultiplier(reactant, coefficient); notifyChanged(); return result; }
/** * Sets the coefficient of a a reactant to a given value. * * @param reactant Reactant for which the coefficient is set * @param coefficient The new coefficient for the given reactant * @return true if Molecule has been found and stoichiometry has been set. * @see #getReactantCoefficient */ @Override public boolean setReactantCoefficient(IAtomContainer reactant, Double coefficient) { boolean result = reactants.setMultiplier(reactant, coefficient); notifyChanged(); return result; }
/** * Sets the coefficient of a a product to a given value. * * @param product Product for which the coefficient is set * @param coefficient The new coefficient for the given product * @return true if Molecule has been found and stoichiometry has been set. * @see #getProductCoefficient */ @Override public boolean setProductCoefficient(IAtomContainer product, Double coefficient) { boolean result = products.setMultiplier(product, coefficient); notifyChanged(); return result; }
/** * Sets the coefficient of a a product to a given value. * * @param product Product for which the coefficient is set * @param coefficient The new coefficient for the given product * @return true if Molecule has been found and stoichiometry has been set. * @see #getProductCoefficient */ @Override public boolean setProductCoefficient(IAtomContainer product, Double coefficient) { boolean result = products.setMultiplier(product, coefficient); notifyChanged(); return result; }
@Test public void testSetMultiplier_int_Double() { IAtomContainerSet som = (IAtomContainerSet) newChemObject(); som.addAtomContainer(som.getBuilder().newInstance(IAtomContainer.class)); Assert.assertEquals(1.0, som.getMultiplier(0), 0.00001); som.setMultiplier(0, 2.0); Assert.assertEquals(2.0, som.getMultiplier(0), 0.00001); }
@Test public void testSetMultiplier_IAtomContainer_Double() { IAtomContainerSet som = (IAtomContainerSet) newChemObject(); IAtomContainer container = som.getBuilder().newInstance(IAtomContainer.class); som.addAtomContainer(container); Assert.assertEquals(1.0, som.getMultiplier(container), 0.00001); som.setMultiplier(container, 2.0); Assert.assertEquals(2.0, som.getMultiplier(container), 0.00001); }