code: public IIsotope getIsotope(String symbol, double exactMass, double tolerance) {
          IIsotope ret = null;
          double minDiff = Double.MAX_VALUE;
          int elem = Elements.ofString(symbol).number();
          List<IIsotope> isotopes = this.isotopes[elem];
          if (isotopes == null)
              return null;
          for (IIsotope isotope : isotopes) {
              double diff = Math.abs(isotope.getExactMass() - exactMass);
              if (isotope.getSymbol().equals(symbol) && diff <= tolerance && diff < minDiff) {
                  ret = clone(isotope);
                  minDiff = diff;
              }
          }
          return ret;
      }
docs: Get an isotope based on the element symbol and exact mass.
  
  @param symbol    the element symbol
  @param exactMass the mass number
  @param tolerance allowed difference from provided exact mass
  @return the corresponding isotope