test_class.declarator: builder = SilentChemObjectBuilder.getInstance()
test_class.modifier: private final static
test_class.original_string: private final static IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
test_class.type: IChemObjectBuilder
test_class.var_name: builder
test_class.declarator: ifac
test_class.modifier: private
test_class.original_string: private IsotopeFactory                  ifac;
test_class.type: IsotopeFactory
test_class.var_name: ifac
test_class.file: legacy/src/test/java/org/openscience/cdk/formula/MassToFormulaToolTest.java
test_class.identifier: MassToFormulaToolTest
test_class.superclass: extends CDKTestCase
test_case.body: @Test
      public void testHighMass() throws Exception {
          MassToFormulaTool mfTool = new MassToFormulaTool(builder);
  
          List<IRule> myRules = new ArrayList<IRule>();
  
          IRule rule1 = new ElementRule();
          Object[] params = new Object[1];
          MolecularFormulaRange mfRange = new MolecularFormulaRange();
          mfRange.addIsotope(ifac.getMajorIsotope("C"), 0, 200);
          mfRange.addIsotope(ifac.getMajorIsotope("H"), 0, 200);
          mfRange.addIsotope(ifac.getMajorIsotope("O"), 0, 200);
          mfRange.addIsotope(ifac.getMajorIsotope("N"), 0, 50);
          mfRange.addIsotope(ifac.getMajorIsotope("S"), 0, 50);
          params[0] = mfRange;
          rule1.setParameters(params);
          myRules.add(rule1);
          mfTool.setRestrictions(myRules);
  
          //		IMolecularFormulaSet mfSet = mfTool.generate(5577.48486328125);
          //		// FIXME: MF: no hits found. InChI of at least one hit is given in the JavaDoc
          //		// FIXME: MF: M: Now it is found but is taking to much time for the calculation
          //		for(int i=0; i < mfSet.size();i++)
          //			System.out.println(MolecularFormulaManipulator.getString(mfSet.getMolecularFormula(i)));
          //		Assert.assertNotNull(mfSet);
          //		Assert.assertNotSame(0, mfSet.size());
      }
test_case.class_method_signature: MassToFormulaToolTest.testHighMass()
test_case.full_signature: @Test public void testHighMass()
test_case.identifier: testHighMass
test_case.invocations: addIsotope getMajorIsotope addIsotope getMajorIsotope addIsotope getMajorIsotope addIsotope getMajorIsotope addIsotope getMajorIsotope setParameters add setRestrictions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testHighMass()
focal_class.declarator: logger = LoggingToolFactory.createLoggingTool(MassToFormulaTool.class)
focal_class.modifier: private
focal_class.original_string: private ILoggingTool          logger = LoggingToolFactory.createLoggingTool(MassToFormulaTool.class);
focal_class.type: ILoggingTool
focal_class.var_name: logger
focal_class.declarator: builder
focal_class.modifier: private
focal_class.original_string: private IChemObjectBuilder    builder;
focal_class.type: IChemObjectBuilder
focal_class.var_name: builder
focal_class.declarator: factory
focal_class.original_string: AtomTypeFactory               factory;
focal_class.type: AtomTypeFactory
focal_class.var_name: factory
focal_class.declarator: matrix_Base
focal_class.modifier: private
focal_class.original_string: private int[][]               matrix_Base;
focal_class.type: int[][]
focal_class.var_name: matrix_Base
focal_class.declarator: orderElements
focal_class.modifier: private
focal_class.original_string: private String[]              orderElements;
focal_class.type: String[]
focal_class.var_name: orderElements
focal_class.declarator: rules
focal_class.modifier: private
focal_class.original_string: private List<IRule>           rules;
focal_class.type: List<IRule>
focal_class.var_name: rules
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.declarator: charge
focal_class.modifier: private
focal_class.original_string: private Double                charge;
focal_class.type: Double
focal_class.var_name: charge
focal_class.declarator: tolerance
focal_class.modifier: private
focal_class.original_string: private Double                tolerance;
focal_class.type: Double
focal_class.var_name: tolerance
focal_class.file: legacy/src/main/java/org/openscience/cdk/formula/MassToFormulaTool.java
focal_class.identifier: MassToFormulaTool
focal_class.class_method_signature: MassToFormulaTool.MassToFormulaTool(IChemObjectBuilder builder)
focal_class.full_signature: public  MassToFormulaTool(IChemObjectBuilder builder)
focal_class.identifier: MassToFormulaTool
focal_class.modifiers: public
focal_class.parameters: (IChemObjectBuilder builder)
focal_class.signature:  MassToFormulaTool(IChemObjectBuilder builder)
focal_class.class_method_signature: MassToFormulaTool.setRestrictions(List<IRule> rulesNew)
focal_class.full_signature: public void setRestrictions(List<IRule> rulesNew)
focal_class.identifier: setRestrictions
focal_class.modifiers: public
focal_class.parameters: (List<IRule> rulesNew)
focal_class.return: void
focal_class.signature: void setRestrictions(List<IRule> rulesNew)
focal_class.class_method_signature: MassToFormulaTool.getRestrictions()
focal_class.full_signature: public List<IRule> getRestrictions()
focal_class.identifier: getRestrictions
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<IRule>
focal_class.signature: List<IRule> getRestrictions()
focal_class.class_method_signature: MassToFormulaTool.setDefaultRestrictions()
focal_class.full_signature: public void setDefaultRestrictions()
focal_class.identifier: setDefaultRestrictions
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void setDefaultRestrictions()
focal_class.class_method_signature: MassToFormulaTool.callDefaultRestrictions()
focal_class.full_signature: private void callDefaultRestrictions()
focal_class.identifier: callDefaultRestrictions
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void callDefaultRestrictions()
focal_class.class_method_signature: MassToFormulaTool.generate(double mass)
focal_class.full_signature: public IMolecularFormulaSet generate(double mass)
focal_class.identifier: generate
focal_class.modifiers: public
focal_class.parameters: (double mass)
focal_class.return: IMolecularFormulaSet
focal_class.signature: IMolecularFormulaSet generate(double mass)
focal_class.class_method_signature: MassToFormulaTool.orderList(List<IIsotope> isotopes_TO)
focal_class.full_signature: private List<IIsotope> orderList(List<IIsotope> isotopes_TO)
focal_class.identifier: orderList
focal_class.modifiers: private
focal_class.parameters: (List<IIsotope> isotopes_TO)
focal_class.return: List<IIsotope>
focal_class.signature: List<IIsotope> orderList(List<IIsotope> isotopes_TO)
focal_class.class_method_signature: MassToFormulaTool.generateOrderE()
focal_class.full_signature: private String[] generateOrderE()
focal_class.identifier: generateOrderE
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] generateOrderE()
focal_class.class_method_signature: MassToFormulaTool.getMaxOccurence(double massTo, int element_pos, int[] matrix, List<IIsotope> isoToCond_new)
focal_class.full_signature: private int getMaxOccurence(double massTo, int element_pos, int[] matrix, List<IIsotope> isoToCond_new)
focal_class.identifier: getMaxOccurence
focal_class.modifiers: private
focal_class.parameters: (double massTo, int element_pos, int[] matrix, List<IIsotope> isoToCond_new)
focal_class.return: int
focal_class.signature: int getMaxOccurence(double massTo, int element_pos, int[] matrix, List<IIsotope> isoToCond_new)
focal_class.class_method_signature: MassToFormulaTool.getFormula(List<IIsotope> isoToCond_new, int[] value_In)
focal_class.full_signature: private IMolecularFormula getFormula(List<IIsotope> isoToCond_new, int[] value_In)
focal_class.identifier: getFormula
focal_class.modifiers: private
focal_class.parameters: (List<IIsotope> isoToCond_new, int[] value_In)
focal_class.return: IMolecularFormula
focal_class.signature: IMolecularFormula getFormula(List<IIsotope> isoToCond_new, int[] value_In)
focal_class.class_method_signature: MassToFormulaTool.putInOrder(IMolecularFormula formula)
focal_class.full_signature: private IMolecularFormula putInOrder(IMolecularFormula formula)
focal_class.identifier: putInOrder
focal_class.modifiers: private
focal_class.parameters: (IMolecularFormula formula)
focal_class.return: IMolecularFormula
focal_class.signature: IMolecularFormula putInOrder(IMolecularFormula formula)
focal_class.class_method_signature: MassToFormulaTool.calculateMassT(List<IIsotope> isoToCond_new, int[] value_In)
focal_class.full_signature: private double calculateMassT(List<IIsotope> isoToCond_new, int[] value_In)
focal_class.identifier: calculateMassT
focal_class.modifiers: private
focal_class.parameters: (List<IIsotope> isoToCond_new, int[] value_In)
focal_class.return: double
focal_class.signature: double calculateMassT(List<IIsotope> isoToCond_new, int[] value_In)
focal_class.class_method_signature: MassToFormulaTool.returnOrdered(double mass, IMolecularFormulaSet formulaSet)
focal_class.full_signature: private IMolecularFormulaSet returnOrdered(double mass, IMolecularFormulaSet formulaSet)
focal_class.identifier: returnOrdered
focal_class.modifiers: private
focal_class.parameters: (double mass, IMolecularFormulaSet formulaSet)
focal_class.return: IMolecularFormulaSet
focal_class.signature: IMolecularFormulaSet returnOrdered(double mass, IMolecularFormulaSet formulaSet)
focal_class.class_method_signature: MassToFormulaTool.getMatrix(int size)
focal_class.full_signature: private int[][] getMatrix(int size)
focal_class.identifier: getMatrix
focal_class.modifiers: private
focal_class.parameters: (int size)
focal_class.return: int[][]
focal_class.signature: int[][] getMatrix(int size)
focal_method.body: public void setRestrictions(List<IRule> rulesNew) throws CDKException {
  
          Iterator<IRule> itRules = rulesNew.iterator();
          while (itRules.hasNext()) {
              IRule rule = itRules.next();
              if (rule instanceof ElementRule) {
                  mfRange = (MolecularFormulaRange) ((Object[]) rule.getParameters())[0];
  
                  //removing the rule
                  Iterator<IRule> oldRuleIt = rules.iterator();
                  while (oldRuleIt.hasNext()) {
                      IRule oldRule = oldRuleIt.next();
                      if (oldRule instanceof ElementRule) {
                          rules.remove(oldRule);
                          rules.add(rule);
                          break;
                      }
                  }
                  this.matrix_Base = getMatrix(mfRange.getIsotopeCount());
              } else if (rule instanceof ChargeRule) {
                  this.charge = (Double) ((Object[]) rule.getParameters())[0];
  
                  //removing the rule
                  Iterator<IRule> oldRuleIt = rules.iterator();
                  while (oldRuleIt.hasNext()) {
                      IRule oldRule = oldRuleIt.next();
                      if (oldRule instanceof ChargeRule) {
                          rules.remove(oldRule);
                          rules.add(rule);
                          break;
                      }
                  }
              } else if (rule instanceof ToleranceRangeRule) {
                  this.tolerance = (Double) ((Object[]) rule.getParameters())[1];
                  //removing the rule
                  Iterator<IRule> oldRuleIt = rules.iterator();
                  while (oldRuleIt.hasNext()) {
                      IRule oldRule = oldRuleIt.next();
                      if (oldRule instanceof ToleranceRangeRule) {
                          rules.remove(oldRule);
                          rules.add(rule);
                          break;
                      }
                  }
              } else {
                  rules.add(rule);
              }
  
          }
      }
focal_method.class_method_signature: MassToFormulaTool.setRestrictions(List<IRule> rulesNew)
focal_method.full_signature: public void setRestrictions(List<IRule> rulesNew)
focal_method.identifier: setRestrictions
focal_method.invocations: iterator hasNext next getParameters iterator hasNext next remove add getMatrix getIsotopeCount getParameters iterator hasNext next remove add getParameters iterator hasNext next remove add add
focal_method.modifiers: public
focal_method.parameters: (List<IRule> rulesNew)
focal_method.return: void
focal_method.signature: void setRestrictions(List<IRule> rulesNew)