code: 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()]);
      }
docs: Gets an array of all isotopes matching the searched exact mass within
  a certain difference.
  
  @param  exactMass  search mass
  @param  difference mass the isotope is allowed to differ from the search mass
  @return            An array of all isotopes