code: public Integer getInteger(String key, Integer def) {
          String value = getString(key);
          if (value == null) {
              return def;
          }
          else {
              try {
                  return Integer.valueOf(value);
              }
              catch (NumberFormatException e) {
              }
              return def;
          }
      }
docs: Returns the default value if the given key isn't in this PropertyMap or
  it isn't a valid integer.
  
  @param key Key of property to read
  @param def Default value