public IIsotope [ ] getIsotopes ( double exactMass , double difference ) { List < IIsotope > list = new ArrayList <> ( ) ; for ( List < IIsotope > isotopes : this . isotopes ) { if ( isotopes == null ) continue ; for ( IIsotope isotope : isotopes ) { if ( Math . abs ( isotope . getExactMass ( ) - exactMass ) <= difference ) { list . add ( clone ( isotope ) ) ; } } } return list . toArray ( new IIsotope [ list . size ( ) ] ) ; }
Gets an array of all isotopes matching the searched exact mass within a certain difference .