code: private double calculateCurrentMass() {
          double mass = 0;
          for (int i = 0; i < isotopes.length; i++) {
              mass += currentCounts[i] * isotopes[i].getExactMass();
          }
  
          return mass;
      }
docs: Calculates the exact mass of the currently evaluated formula. Basically,
  it multiplies the currentCounts[] array by the masses of the isotopes in
  the isotopes[] array.