Gets the int value for <code>key</code> or <code>defaultValue</code> if not found.

@param key key to get value for
@param defaultValue default value if key not found
@return value or <code>defaultValue</code> if not found
975200
public int getInt(String key, int defaultValue) {
    if (containsKey(key)) {
      return Integer.parseInt(get(key));
    } else {
      return defaultValue;
    }
  }
762547
public int getIntCount(Object key) {
    MutableInteger count =  map.get(key);
    if (count == null) {
      return defaultValue; // haven't seen this object before -> 0 count
    }
    return count.intValue();
  }
254819
public static <T> T get(String key, T defaultValue) {
    return hawkFacade.get(key, defaultValue);
  }
377896
public Object get(String key, Object defaultValue) {
        Object value = get(key);
        return value == null ? defaultValue : value;
    }
1372318
public long getCapacityBytesOnTiersOrDefault(
      java.lang.String key,
      long defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.Long> map =
        internalGetCapacityBytesOnTiers().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
386514
public static double getConfigDouble(String key, double defaultValue) {
		return NumberUtils.toDouble(getConfigParam(key, Double.toString(defaultValue)));
	}
1170716
private int getIntProperty(String key, boolean defaultProvided, int defaultValue, StringBuilder errors) {
        String value = getStringProperty(key);
        if (null != value) {
            try {
                int realValue = Integer.parseInt(value);
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Property " + key + " set to " + realValue);
                }
                return realValue;
            } catch (NumberFormatException nfe) {
                // no FFDC required;
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Property " + key + ", format error in [" + value + "]");
                }
            }
        }
        if (!defaultProvided) {
            // No default available. This is an error.
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Property " + key + " not found.  Error being tallied.");
            }
            errors.append(key);
            errors.append(":null \n");
            return -1;
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Property " + key + " using default " + defaultValue);
        }
        return defaultValue;
    }
901033
public int get(Object key, int defaultValue) {
        if (key == null) { key = UniqueTag.NULL_VALUE; }
        int index = findIndex(key);
        if (0 <= index) {
            return values[index];
        }
        return defaultValue;
    }
331848
public synchronized String getAttribute(String key, String defaultValue)
	{
		if(attributes.containsKey(key))
		{
			return attributes.get(key).toString();
		}
		return defaultValue;
	}
1319101
public boolean getProperty(String key, boolean defaultValue) {
        String value = getProperty(key, String.class);
        return StringUtils.isEmpty(value) ? defaultValue : Boolean.parseBoolean(value);
    }
121197
public Integer getIntegerProperty(String key, Integer defaultValue) {
        String val = getProperty(key, defaultValue.toString());
        try {
            Integer intVal = Integer.parseInt(val);
            return intVal;
        } catch (NumberFormatException e) {
            return defaultValue;
        }
    }
126846
public String get(String key, String defaultValue) {
        String v = get(key);
        if (v==null)    v=defaultValue;
        return v;
    }
1118378
public java.lang.String getRetOrDefault(
      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 =
        internalGetRet().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
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;
	}
1373358
public Integer getInt(String key, Integer defaultValue) throws SyntaxException
    {
        String value = getSimple(key);
        return toInt(key, value, defaultValue);
    }
789407
public function get($key, $defaultValue = null)
    {
        if (!isset($this->keyToIndexMap[$key]) && 2 === func_num_args()) {
            return $defaultValue;
        }

        return $this->value($key);
    }
98502
public int getInteger(String name, int defaultValue) {
        try {
            String value = getString(name, null);
            if (!StringUtils.isNullOrEmpty(value)) {
                return Integer.parseInt(value.trim());
            }
        } catch (NumberFormatException e) {
            log.warn("Failed to parse integer for " + name + USING_DEFAULT_OF
                + defaultValue);
        }

        return defaultValue;
    }