test_class.declarator: builder
test_class.modifier: private static
test_class.original_string: private static IChemObjectBuilder builder;
test_class.type: IChemObjectBuilder
test_class.var_name: builder
test_class.file: tool/formula/src/test/java/org/openscience/cdk/formula/rules/ElementRuleTest.java
test_class.identifier: ElementRuleTest
test_class.superclass: extends FormulaRuleTest
test_case.body: @Test
      public void testSetParameters() throws Exception {
  
          IRule rule = new ElementRule();
  
          Object[] params = new Object[1];
  
          MolecularFormulaRange mfRange = new MolecularFormulaRange();
          mfRange.addIsotope(builder.newInstance(IIsotope.class, "C"), 1, 10);
          mfRange.addIsotope(builder.newInstance(IIsotope.class, "H"), 1, 10);
          params[0] = mfRange;
  
          rule.setParameters(params);
  
          Object[] objects = rule.getParameters();
          Assert.assertEquals(1, objects.length);
  
          MolecularFormulaRange mfRange2 = (MolecularFormulaRange) objects[0];
          Assert.assertEquals(mfRange.getIsotopeCount(), mfRange2.getIsotopeCount());
          Assert.assertEquals(mfRange.getIsotopeCountMin(new Isotope("C")), mfRange2.getIsotopeCountMin(new Isotope("C")));
          Assert.assertEquals(mfRange.getIsotopeCountMax(new Isotope("C")), mfRange2.getIsotopeCountMax(new Isotope("C")));
      }
test_case.class_method_signature: ElementRuleTest.testSetParameters()
test_case.full_signature: @Test public void testSetParameters()
test_case.identifier: testSetParameters
test_case.invocations: addIsotope newInstance addIsotope newInstance setParameters getParameters assertEquals assertEquals getIsotopeCount getIsotopeCount assertEquals getIsotopeCountMin getIsotopeCountMin assertEquals getIsotopeCountMax getIsotopeCountMax
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSetParameters()
focal_class.declarator: logger = LoggingToolFactory.createLoggingTool(ElementRule.class)
focal_class.modifier: private static
focal_class.original_string: private static ILoggingTool   logger = LoggingToolFactory.createLoggingTool(ElementRule.class);
focal_class.type: ILoggingTool
focal_class.var_name: logger
focal_class.declarator: mfRange
focal_class.modifier: private
focal_class.original_string: private MolecularFormulaRange mfRange;
focal_class.type: MolecularFormulaRange
focal_class.var_name: mfRange
focal_class.file: tool/formula/src/main/java/org/openscience/cdk/formula/rules/ElementRule.java
focal_class.identifier: ElementRule
focal_class.interfaces: implements IRule
focal_class.class_method_signature: ElementRule.ElementRule()
focal_class.full_signature: public  ElementRule()
focal_class.identifier: ElementRule
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  ElementRule()
focal_class.class_method_signature: ElementRule.setParameters(Object[] params)
focal_class.full_signature: @Override public void setParameters(Object[] params)
focal_class.identifier: setParameters
focal_class.modifiers: @Override public
focal_class.parameters: (Object[] params)
focal_class.return: void
focal_class.signature: void setParameters(Object[] params)
focal_class.class_method_signature: ElementRule.getParameters()
focal_class.full_signature: @Override public Object[] getParameters()
focal_class.identifier: getParameters
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Object[]
focal_class.signature: Object[] getParameters()
focal_class.class_method_signature: ElementRule.validate(IMolecularFormula formula)
focal_class.full_signature: @Override public double validate(IMolecularFormula formula)
focal_class.identifier: validate
focal_class.modifiers: @Override public
focal_class.parameters: (IMolecularFormula formula)
focal_class.return: double
focal_class.signature: double validate(IMolecularFormula formula)
focal_class.class_method_signature: ElementRule.ensureDefaultOccurElements(IChemObjectBuilder builder)
focal_class.full_signature: private void ensureDefaultOccurElements(IChemObjectBuilder builder)
focal_class.identifier: ensureDefaultOccurElements
focal_class.modifiers: private
focal_class.parameters: (IChemObjectBuilder builder)
focal_class.return: void
focal_class.signature: void ensureDefaultOccurElements(IChemObjectBuilder builder)
focal_method.body: @Override
      public void setParameters(Object[] params) throws CDKException {
          if (params.length != 1) throw new CDKException("ElementRule expects one parameters");
  
          if (!(params[0] == null || params[0] instanceof MolecularFormulaRange))
              throw new CDKException("The parameter must be of type MolecularFormulaExpand");
  
          mfRange = (MolecularFormulaRange) params[0];
      }
focal_method.class_method_signature: ElementRule.setParameters(Object[] params)
focal_method.full_signature: @Override public void setParameters(Object[] params)
focal_method.identifier: setParameters
focal_method.modifiers: @Override public
focal_method.parameters: (Object[] params)
focal_method.return: void
focal_method.signature: void setParameters(Object[] params)