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 testSetDefaultRestrictions() {
          MassToFormulaTool mfTool = new MassToFormulaTool(builder);
  
          List<IRule> rules = mfTool.getRestrictions();
          Assert.assertNotNull(rules);
  
          Assert.assertEquals(3, rules.size());
  
          ElementRule elemR = (ElementRule) rules.get(0);
          Assert.assertEquals(1, elemR.getParameters().length);
          Object[] objects = elemR.getParameters();
          MolecularFormulaRange mfRange = (MolecularFormulaRange) objects[0];
          Assert.assertEquals(4, mfRange.getIsotopeCount());
          Assert.assertEquals(15, mfRange.getIsotopeCountMax(ifac.getMajorIsotope("C")));
          Assert.assertEquals(0, mfRange.getIsotopeCountMin(ifac.getMajorIsotope("C")));
          Assert.assertEquals(15, mfRange.getIsotopeCountMax(ifac.getMajorIsotope("H")));
          Assert.assertEquals(0, mfRange.getIsotopeCountMin(ifac.getMajorIsotope("H")));
          Assert.assertEquals(15, mfRange.getIsotopeCountMax(ifac.getMajorIsotope("N")));
          Assert.assertEquals(0, mfRange.getIsotopeCountMin(ifac.getMajorIsotope("N")));
          Assert.assertEquals(15, mfRange.getIsotopeCountMax(ifac.getMajorIsotope("O")));
          Assert.assertEquals(0, mfRange.getIsotopeCountMin(ifac.getMajorIsotope("O")));
  
          ChargeRule chargeR = (ChargeRule) rules.get(1);
          Assert.assertEquals(1, chargeR.getParameters().length);
          objects = chargeR.getParameters();
          double charge = (Double) objects[0];
          Assert.assertEquals(0.0, charge, 0.001);
  
          ToleranceRangeRule toleranceR = (ToleranceRangeRule) rules.get(2);
          Assert.assertEquals(2, toleranceR.getParameters().length);
          objects = toleranceR.getParameters();
          double mass = (Double) objects[0];
          Assert.assertEquals(0.0, mass, 0.001);
          double tolerance = (Double) objects[1];
          Assert.assertEquals(0.05, tolerance, 0.001);
  
      }
test_case.class_method_signature: MassToFormulaToolTest.testSetDefaultRestrictions()
test_case.full_signature: @Test public void testSetDefaultRestrictions()
test_case.identifier: testSetDefaultRestrictions
test_case.invocations: getRestrictions assertNotNull assertEquals size get assertEquals getParameters getParameters assertEquals getIsotopeCount assertEquals getIsotopeCountMax getMajorIsotope assertEquals getIsotopeCountMin getMajorIsotope assertEquals getIsotopeCountMax getMajorIsotope assertEquals getIsotopeCountMin getMajorIsotope assertEquals getIsotopeCountMax getMajorIsotope assertEquals getIsotopeCountMin getMajorIsotope assertEquals getIsotopeCountMax getMajorIsotope assertEquals getIsotopeCountMin getMajorIsotope get assertEquals getParameters getParameters assertEquals get assertEquals getParameters getParameters assertEquals assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSetDefaultRestrictions()
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 setDefaultRestrictions() {
          try {
              callDefaultRestrictions();
          } catch (CDKException e) {
              e.printStackTrace();
          } catch (IOException e) {
              e.printStackTrace();
          }
      }
focal_method.class_method_signature: MassToFormulaTool.setDefaultRestrictions()
focal_method.full_signature: public void setDefaultRestrictions()
focal_method.identifier: setDefaultRestrictions
focal_method.invocations: callDefaultRestrictions printStackTrace printStackTrace
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void setDefaultRestrictions()