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.file: tool/formula/src/test/java/org/openscience/cdk/tools/manipulator/MolecularFormulaSetManipulatorTest.java
test_class.identifier: MolecularFormulaSetManipulatorTest
test_class.superclass: extends CDKTestCase
test_case.body: @Test
      public void testRemove_IMolecularFormulaSet_IMolecularFormula_IMolecularFormula() {
  
          IMolecularFormula formulaMin = new MolecularFormula();
          formulaMin.addIsotope(builder.newInstance(IIsotope.class, "C"), 1);
          formulaMin.addIsotope(builder.newInstance(IIsotope.class, "H"), 1);
          formulaMin.addIsotope(builder.newInstance(IIsotope.class, "O"), 1);
  
          IMolecularFormula formulaMax = new MolecularFormula();
          formulaMax.addIsotope(builder.newInstance(IIsotope.class, "C"), 4);
          formulaMax.addIsotope(builder.newInstance(IIsotope.class, "H"), 12);
          formulaMax.addIsotope(builder.newInstance(IIsotope.class, "N"), 2);
  
          IMolecularFormula mf1 = new MolecularFormula();
          mf1.addIsotope(builder.newInstance(IIsotope.class, "C"), 3);
          mf1.addIsotope(builder.newInstance(IIsotope.class, "H"), 10);
          mf1.addIsotope(builder.newInstance(IIsotope.class, "N"), 1);
  
          IMolecularFormulaSet formulaSet = new MolecularFormulaSet();
          formulaSet.addMolecularFormula(mf1);
  
          IMolecularFormulaSet newMFSet = MolecularFormulaSetManipulator.remove(formulaSet, formulaMin, formulaMax);
  
          Assert.assertNull(newMFSet);
  
      }
test_case.class_method_signature: MolecularFormulaSetManipulatorTest.testRemove_IMolecularFormulaSet_IMolecularFormula_IMolecularFormula()
test_case.full_signature: @Test public void testRemove_IMolecularFormulaSet_IMolecularFormula_IMolecularFormula()
test_case.identifier: testRemove_IMolecularFormulaSet_IMolecularFormula_IMolecularFormula
test_case.invocations: addIsotope newInstance addIsotope newInstance addIsotope newInstance addIsotope newInstance addIsotope newInstance addIsotope newInstance addIsotope newInstance addIsotope newInstance addIsotope newInstance addMolecularFormula remove assertNull
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRemove_IMolecularFormulaSet_IMolecularFormula_IMolecularFormula()
focal_class.file: tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaSetManipulator.java
focal_class.identifier: MolecularFormulaSetManipulator
focal_class.class_method_signature: MolecularFormulaSetManipulator.getMaxOccurrenceElements(IMolecularFormulaSet mfSet)
focal_class.full_signature: public static IMolecularFormula getMaxOccurrenceElements(IMolecularFormulaSet mfSet)
focal_class.identifier: getMaxOccurrenceElements
focal_class.modifiers: public static
focal_class.parameters: (IMolecularFormulaSet mfSet)
focal_class.return: IMolecularFormula
focal_class.signature: IMolecularFormula getMaxOccurrenceElements(IMolecularFormulaSet mfSet)
focal_class.class_method_signature: MolecularFormulaSetManipulator.getMinOccurrenceElements(IMolecularFormulaSet mfSet)
focal_class.full_signature: public static IMolecularFormula getMinOccurrenceElements(IMolecularFormulaSet mfSet)
focal_class.identifier: getMinOccurrenceElements
focal_class.modifiers: public static
focal_class.parameters: (IMolecularFormulaSet mfSet)
focal_class.return: IMolecularFormula
focal_class.signature: IMolecularFormula getMinOccurrenceElements(IMolecularFormulaSet mfSet)
focal_class.class_method_signature: MolecularFormulaSetManipulator.remove(IMolecularFormulaSet formulaSet, IMolecularFormula formulaMin,
              IMolecularFormula formulaMax)
focal_class.full_signature: public static IMolecularFormulaSet remove(IMolecularFormulaSet formulaSet, IMolecularFormula formulaMin,
              IMolecularFormula formulaMax)
focal_class.identifier: remove
focal_class.modifiers: public static
focal_class.parameters: (IMolecularFormulaSet formulaSet, IMolecularFormula formulaMin,
              IMolecularFormula formulaMax)
focal_class.return: IMolecularFormulaSet
focal_class.signature: IMolecularFormulaSet remove(IMolecularFormulaSet formulaSet, IMolecularFormula formulaMin,
              IMolecularFormula formulaMax)
focal_class.class_method_signature: MolecularFormulaSetManipulator.validCorrelation(IMolecularFormula formulaMin, IMolecularFormula formulamax)
focal_class.full_signature: private static boolean validCorrelation(IMolecularFormula formulaMin, IMolecularFormula formulamax)
focal_class.identifier: validCorrelation
focal_class.modifiers: private static
focal_class.parameters: (IMolecularFormula formulaMin, IMolecularFormula formulamax)
focal_class.return: boolean
focal_class.signature: boolean validCorrelation(IMolecularFormula formulaMin, IMolecularFormula formulamax)
focal_class.class_method_signature: MolecularFormulaSetManipulator.contains(IMolecularFormulaSet formulaSet, IMolecularFormula formula)
focal_class.full_signature: public static boolean contains(IMolecularFormulaSet formulaSet, IMolecularFormula formula)
focal_class.identifier: contains
focal_class.modifiers: public static
focal_class.parameters: (IMolecularFormulaSet formulaSet, IMolecularFormula formula)
focal_class.return: boolean
focal_class.signature: boolean contains(IMolecularFormulaSet formulaSet, IMolecularFormula formula)
focal_class.class_method_signature: MolecularFormulaSetManipulator.remove(IMolecularFormulaSet formulaSet, MolecularFormulaRange formulaRange)
focal_class.full_signature: public static IMolecularFormulaSet remove(IMolecularFormulaSet formulaSet, MolecularFormulaRange formulaRange)
focal_class.identifier: remove
focal_class.modifiers: public static
focal_class.parameters: (IMolecularFormulaSet formulaSet, MolecularFormulaRange formulaRange)
focal_class.return: IMolecularFormulaSet
focal_class.signature: IMolecularFormulaSet remove(IMolecularFormulaSet formulaSet, MolecularFormulaRange formulaRange)
focal_method.body: public static IMolecularFormulaSet remove(IMolecularFormulaSet formulaSet, IMolecularFormula formulaMin,
              IMolecularFormula formulaMax) {
  
          // prove the correlation between maximum and minimum molecularFormula
          if (!validCorrelation(formulaMin, formulaMax)) return null;
  
          IMolecularFormulaSet newFormulaSet = formulaSet.getBuilder().newInstance(IMolecularFormulaSet.class);
  
          for (IMolecularFormula formula : formulaSet.molecularFormulas()) {
              boolean flagPass = true;
  
              // the formula must contain all element found into the formulaMin
              if (!validCorrelation(formula, formulaMin)) continue;
  
              for (IElement element : MolecularFormulaManipulator.elements(formulaMin)) {
                  int occur = MolecularFormulaManipulator.getElementCount(formula, element);
                  int occurMax = MolecularFormulaManipulator.getElementCount(formulaMax, element);
                  int occurMin = MolecularFormulaManipulator.getElementCount(formulaMin, element);
  
                  if (!(occurMin <= occur) || !(occur <= occurMax)) {
                      flagPass = false;
                      break;
                  }
  
              }
              if (flagPass) // stored if each IElement occurrence is into the limits
                  newFormulaSet.addMolecularFormula(formula);
  
          }
          return newFormulaSet;
      }
focal_method.class_method_signature: MolecularFormulaSetManipulator.remove(IMolecularFormulaSet formulaSet, IMolecularFormula formulaMin,
              IMolecularFormula formulaMax)
focal_method.full_signature: public static IMolecularFormulaSet remove(IMolecularFormulaSet formulaSet, IMolecularFormula formulaMin,
              IMolecularFormula formulaMax)
focal_method.identifier: remove
focal_method.invocations: validCorrelation newInstance getBuilder molecularFormulas validCorrelation elements getElementCount getElementCount getElementCount addMolecularFormula
focal_method.modifiers: public static
focal_method.parameters: (IMolecularFormulaSet formulaSet, IMolecularFormula formulaMin,
              IMolecularFormula formulaMax)
focal_method.return: IMolecularFormulaSet
focal_method.signature: IMolecularFormulaSet remove(IMolecularFormulaSet formulaSet, IMolecularFormula formulaMin,
              IMolecularFormula formulaMax)