code: public int getInteger(String key, int defaultValue) {
  		Object o = getObject(key);
  		if (o == null) {
  			return defaultValue;
  		}
  		int val = defaultValue;
  		try {
  			val = Integer.parseInt(o.toString());
  		}
  		catch (Exception e) {
  			throw new IllegalArgumentException("Object ["+o+"] associated with key ["+key+"] is not of type Integer.");
  		}
  		return val;
  	}
docs: Get the integer value, or the defaultValue if not found.
  @param key The key to search for.
  @param defaultValue the default value
  @return The value, or defaultValue if not found.