/** * True, if the AdductFormula contains the given IIsotope object and not * the instance. The method looks for other isotopes which has the same * symbol, natural abundance and exact mass. * * @param isotope The IIsotope this AdductFormula is searched for * @return True, if the AdductFormula contains the given isotope object */ @Override public boolean contains(IIsotope isotope) { for (Iterator<IIsotope> it = isotopes().iterator(); it.hasNext();) { IIsotope thisIsotope = it.next(); if (isTheSame(thisIsotope, isotope)) { return true; } } return false; }
/** * True, if the AdductFormula contains the given IIsotope object and not * the instance. The method looks for other isotopes which has the same * symbol, natural abundance and exact mass. * * @param isotope The IIsotope this AdductFormula is searched for * @return True, if the AdductFormula contains the given isotope object */ @Override public boolean contains(IIsotope isotope) { for (Iterator<IIsotope> it = isotopes().iterator(); it.hasNext();) { IIsotope thisIsotope = it.next(); if (isTheSame(thisIsotope, isotope)) { return true; } } return false; }