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/MMElementRuleTest.java
test_class.identifier: MMElementRuleTest
test_class.superclass: extends FormulaRuleTest
test_case.body: @Test
      public void testSetParameters() throws Exception {
  
          IRule rule = new MMElementRule();
  
          Object[] params = new Object[2];
  
          params[0] = MMElementRule.Database.DNP;
          params[1] = MMElementRule.RangeMass.Minus1000;
  
          rule.setParameters(params);
          Object[] objects = rule.getParameters();
  
          Assert.assertSame(MMElementRule.Database.DNP, objects[0]);
          Assert.assertSame(MMElementRule.RangeMass.Minus1000, objects[1]);
      }
test_case.class_method_signature: MMElementRuleTest.testSetParameters()
test_case.full_signature: @Test public void testSetParameters()
test_case.identifier: testSetParameters
test_case.invocations: setParameters getParameters assertSame assertSame
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSetParameters()
focal_class.declarator: databaseUsed  = Database.WILEY
focal_class.modifier: private
focal_class.original_string: private Database                 databaseUsed  = Database.WILEY;
focal_class.type: Database
focal_class.var_name: databaseUsed
focal_class.declarator: rangeMassUsed = RangeMass.Minus500
focal_class.modifier: private
focal_class.original_string: private RangeMass                rangeMassUsed = RangeMass.Minus500;
focal_class.type: RangeMass
focal_class.var_name: rangeMassUsed
focal_class.declarator: hashMap
focal_class.modifier: private
focal_class.original_string: private HashMap<String, Integer> hashMap;
focal_class.type: HashMap<String, Integer>
focal_class.var_name: hashMap
focal_class.declarator: logger        = LoggingToolFactory.createLoggingTool(MMElementRule.class)
focal_class.modifier: private static
focal_class.original_string: private static ILoggingTool      logger        = LoggingToolFactory.createLoggingTool(MMElementRule.class);
focal_class.type: ILoggingTool
focal_class.var_name: logger
focal_class.file: tool/formula/src/main/java/org/openscience/cdk/formula/rules/MMElementRule.java
focal_class.identifier: MMElementRule
focal_class.interfaces: implements IRule
focal_class.class_method_signature: MMElementRule.MMElementRule()
focal_class.full_signature: public  MMElementRule()
focal_class.identifier: MMElementRule
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  MMElementRule()
focal_class.class_method_signature: MMElementRule.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: MMElementRule.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: MMElementRule.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: MMElementRule.getDNP_500()
focal_class.full_signature: private HashMap<String, Integer> getDNP_500()
focal_class.identifier: getDNP_500
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: HashMap<String, Integer>
focal_class.signature: HashMap<String, Integer> getDNP_500()
focal_class.class_method_signature: MMElementRule.getDNP_1000()
focal_class.full_signature: private HashMap<String, Integer> getDNP_1000()
focal_class.identifier: getDNP_1000
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: HashMap<String, Integer>
focal_class.signature: HashMap<String, Integer> getDNP_1000()
focal_class.class_method_signature: MMElementRule.getDNP_2000()
focal_class.full_signature: private HashMap<String, Integer> getDNP_2000()
focal_class.identifier: getDNP_2000
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: HashMap<String, Integer>
focal_class.signature: HashMap<String, Integer> getDNP_2000()
focal_class.class_method_signature: MMElementRule.getDNP_3000()
focal_class.full_signature: private HashMap<String, Integer> getDNP_3000()
focal_class.identifier: getDNP_3000
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: HashMap<String, Integer>
focal_class.signature: HashMap<String, Integer> getDNP_3000()
focal_class.class_method_signature: MMElementRule.getWisley_500()
focal_class.full_signature: private HashMap<String, Integer> getWisley_500()
focal_class.identifier: getWisley_500
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: HashMap<String, Integer>
focal_class.signature: HashMap<String, Integer> getWisley_500()
focal_class.class_method_signature: MMElementRule.getWisley_1000()
focal_class.full_signature: private HashMap<String, Integer> getWisley_1000()
focal_class.identifier: getWisley_1000
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: HashMap<String, Integer>
focal_class.signature: HashMap<String, Integer> getWisley_1000()
focal_class.class_method_signature: MMElementRule.getWisley_2000()
focal_class.full_signature: private HashMap<String, Integer> getWisley_2000()
focal_class.identifier: getWisley_2000
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: HashMap<String, Integer>
focal_class.signature: HashMap<String, Integer> getWisley_2000()
focal_method.body: @Override
      public void setParameters(Object[] params) throws CDKException {
          if (params.length > 2) throw new CDKException("MMElementRule only expects maximal two parameters");
  
          if (params[0] != null) {
              if (!(params[0] instanceof Database))
                  throw new CDKException("The parameter must be of type Database enum");
              databaseUsed = (Database) params[0];
          }
  
          if (params.length > 1 && params[1] != null) {
              if (!(params[1] instanceof RangeMass))
                  throw new CDKException("The parameter must be of type RangeMass enum");
              rangeMassUsed = (RangeMass) params[1];
          }
  
          if ((databaseUsed == Database.DNP) && (rangeMassUsed == RangeMass.Minus500))
              this.hashMap = getDNP_500();
          else if ((databaseUsed == Database.DNP) && (rangeMassUsed == RangeMass.Minus1000))
              this.hashMap = getDNP_1000();
          else if ((databaseUsed == Database.DNP) && (rangeMassUsed == RangeMass.Minus2000))
              this.hashMap = getDNP_2000();
          else if ((databaseUsed == Database.DNP) && (rangeMassUsed == RangeMass.Minus3000))
              this.hashMap = getDNP_3000();
          else if ((databaseUsed == Database.WILEY) && (rangeMassUsed == RangeMass.Minus500))
              this.hashMap = getWisley_500();
          else if ((databaseUsed == Database.WILEY) && (rangeMassUsed == RangeMass.Minus1000))
              this.hashMap = getWisley_1000();
          else if ((databaseUsed == Database.WILEY) && (rangeMassUsed == RangeMass.Minus2000))
              this.hashMap = getWisley_2000();
      }
focal_method.class_method_signature: MMElementRule.setParameters(Object[] params)
focal_method.full_signature: @Override public void setParameters(Object[] params)
focal_method.identifier: setParameters
focal_method.invocations: getDNP_500 getDNP_1000 getDNP_2000 getDNP_3000 getWisley_500 getWisley_1000 getWisley_2000
focal_method.modifiers: @Override public
focal_method.parameters: (Object[] params)
focal_method.return: void
focal_method.signature: void setParameters(Object[] params)