Permalink
Browse files

add new MolecularFormulaManipulator.getElementCount static methods th…

…at take (formula, IIsotope) and (formula, String)
  • Loading branch information...
1 parent ea62028 commit ee7907e047826ca204c4e920c8ae1cb9fc9fc394 @slyrus slyrus committed with johnmay Jan 29, 2014
@@ -95,6 +95,14 @@ public static int getElementCount(IMolecularFormula formula, IElement element) {
return count;
}
+ public static int getElementCount(IMolecularFormula formula, IIsotope isotope) {
+ return getElementCount(formula, formula.getBuilder().newInstance(IElement.class, isotope));
+ }
+
+ public static int getElementCount(IMolecularFormula formula, String symbol) {
+ return getElementCount(formula, formula.getBuilder().newInstance(IIsotope.class, symbol));
+ }
+
/**
* Get a list of IIsotope from a given IElement which is contained
* molecular. The search is based only on the IElement.

0 comments on commit ee7907e

Please sign in to comment.