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.
547645
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;
	}
789407
public function get($key, $defaultValue = null)
    {
        if (!isset($this->keyToIndexMap[$key]) && 2 === func_num_args()) {
            return $defaultValue;
        }

        return $this->value($key);
    }
1127263
public java.lang.String getBetaSettingsOrDefault(
      java.lang.String key,
      java.lang.String defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetBetaSettings().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
965214
public <T> T get(String key, T defaultValue) {
        T value = get(key);
        if (value == null) {
            return defaultValue;
        }
        return value;
    }
1205428
@Override
    public Object get(int key, Object defaultValue) {
	if (key <= 0) return defaultValue;
	if (key > list.size()) return defaultValue;

	try {
	    Object rtn = list.get(key - 1);
	    if (rtn == null) {
		if (NullSupportHelper.full()) {
		    return null;
		}
		return defaultValue;
	    }
	    return rtn;
	}
	catch (Exception e) {
	    return defaultValue;
	}
    }
985050
public String get(String key, String defaultValue)
    {
        if( configs.containsKey(key) ){
            return configs.get(key);
        }

        return defaultValue;
    }
304303
public static int getIntegerValue(String appName, String key, int defaultValue) {
        String ret = getStringValue0(appName, key);
        return StringUtils.isEmpty(ret) ? defaultValue : CommonUtils.parseInt(ret, defaultValue);
    }
849612
protected final int getIntValue(final String propertyName, int defaultValue) {
        int result;
        String property = this.properties.getProperty(propertyName);
        try {
            result = Integer.parseInt(property);
        } catch (NumberFormatException e) {
            LOGGER.warn("Invalid integer property in configuration: {}",
                    propertyName);
            result = defaultValue;
        }
        return result;
    }
18512
public static int toInteger(Object value, int defaultValue) {
		if (value == null || value.toString().trim().equals("")) {
			return defaultValue;
		}
		if (value instanceof Integer) {
			return (Integer) value;
		}
		return (int) JKConversionUtil.toDouble(value);
	}
254819
public static <T> T get(String key, T defaultValue) {
    return hawkFacade.get(key, defaultValue);
  }
1202543
public float getFloat(String key, float defaultValue) {
		addToDefaults(key, Float.toString(defaultValue));
		String value = get(key);
		if (value == null) {
			return defaultValue;
		} else {
			return Float.valueOf(value);
		}
	}
930224
public int getIntegerProperty(String key, int defaultValue, int[] values) {

        String prop  = getProperty(key);
        int    value = defaultValue;

        try {
            if (prop != null) {
                value = Integer.parseInt(prop);
            }
        } catch (NumberFormatException e) {}

        if (ArrayUtil.find(values, value) == -1) {
            return defaultValue;
        }

        return value;
    }
126846
public String get(String key, String defaultValue) {
        String v = get(key);
        if (v==null)    v=defaultValue;
        return v;
    }
521617
public String getProperty(String key, String defaultValue) {
        String value = resolver.get(key);
        return (value == null) ? defaultValue : value;
    }
750116
public int getInt(String key, int defaultValue) {
    	String value = get(key);
    	if(value == null) return defaultValue;
    	try {
    		return Integer.parseInt(value);
        } catch (NumberFormatException e) {
            throw new IllegalArgumentException(key + " parameter should be a number");
        }
    }
195753
public static int getIntValue(Config stormConf, String key, int defaultValue)
    {
        Object config = stormConf.get(key);

        if (config == null)
        {
            return defaultValue;
        }

        return Integer.parseInt(config.toString());
    }
55457
public Object getAttribute(String key, Object defaultValue)
    {
        Object attributeValue = getUserAttribute(key, null);
        if (attributeValue != null)
            return attributeValue;
        attributeValue = getSessionAttribute(key, null);
        if (attributeValue != null)
            return attributeValue;
        return defaultValue;
    }