Calls the getValue method first and the converts to an integer.
@param keyIdField the key to obtain
@return the integer value associated
771847
public int getValueAsIntWithDefault(String keyIdField, int defaultVal) throws IOException {
        if(keyToValue.containsKey(keyIdField)) {
            return Integer.parseInt(getValue(keyIdField));
        }
        else return defaultVal;
    }
664512
public static int toInt(String parameterValue) {
        int result = -1;
        if (isDigits(parameterValue))
            result = Integer.parseInt(parameterValue);
        return result;
    }
612263
public int get(int key, int defaultValue) {
    int index = getKeyIndex(key);
    if (index >= 0) {
      return values[index];
    } else {
      return defaultValue;
    }
  }
1058108
public static int getInt(JSONValue value) {
        if (value == null)
            return 0;
        if (!(value instanceof Number))
            throw new JSONException(NOT_A_NUMBER);
        return ((Number)value).intValue();
    }
158635
public static String getSInt( int Value ) {
		//
		String Result = "";
		//
		Result = String.format( "%d", Value );
		//
		return Result;
	}
112624
private Integer getIntegerField(JsonNode json, String fieldName) {
        if (!json.has(fieldName)) {
            return null;
        }
        return json.get(fieldName).intValue();
    }
922498
public static int parseInt(String val, int defValue){
        if(TextUtils.isEmpty(val)) return defValue;
        try{
            return Integer.parseInt(val);
        }catch (NumberFormatException e){
            return defValue;
        }
    }
561934
private String getValueForId(String id) {
        for (int k = 0; k < fieldset.getWidgetCount(); k++) {
            Widget widget = fieldset.getWidget(k);
            if (id.equals(widget.getElement().getAttribute("id")))
                return widget.getElement().getAttribute("value");
        }
        return null;
    }
671242
public static int getInt(CSProperties p, String key) throws ParseException {
        String val = p.get(key).toString();
        if (val == null) {
            throw new IllegalArgumentException(key);
        }
        return Integer.parseInt(val);
    }
1104279
public static Integer toInteger(final StringValue stringValue)
	{
		Integer value = null;
		if (isNotNullOrEmpty(stringValue))
		{
			try
			{
				value = stringValue.toInteger();
			}
			catch (final StringValueConversionException e)
			{
				LOGGER.error("Error by converting the given StringValue.", e);
			}
		}
		return value;
	}
299466
protected int getIntValue() throws LazyException{
		int i=startIndex;
		boolean sign=false;
		int value=0;
		if(type==VALUE_FLOAT){
			return (int)getDoubleValue();
		}else if(type==VALUE_STRING || type==VALUE_ESTRING){
			// Attempt to parse as an int, throw if impossible
			if(dirty){
				if(dirtyBuf.charAt(i)=='-'){
					sign=true;
					i++;
				}
				for(;i<endIndex;i++){
					char c=dirtyBuf.charAt(i);
					if(c<'0'||c>'9')throw new LazyException("'"+getStringValue()+"' is not a valid integer",startIndex);
					value+='0'-c;
					if(i+1<endIndex){
						value*=10;
					}
				}
			}else{	
				if(cbuf[i]=='-'){
					sign=true;
					i++;
				}
				for(;i<endIndex;i++){
					char c=cbuf[i];
					if(c<'0'||c>'9')throw new LazyException("'"+getStringValue()+"' is not a valid integer",startIndex);
					value+='0'-c;
					if(i+1<endIndex){
						value*=10;
					}
				}
			}
			return sign?value:-value;
		}else if(type==VALUE_INTEGER){
			if(dirty){
				if(dirtyBuf.charAt(i)=='-'){
					sign=true;
					i++;
				}
				for(;i<endIndex;i++){
					char c=dirtyBuf.charAt(i);
					// If we only allow this to be called on integer values, the parsing is pre done!
					// if(c<'0'||c>'9')throw new LazyException("'"+getStringValue(source)+"' is not a valid integer",startIndex);
					value+='0'-c;
					if(i+1<endIndex){
						value*=10;
					}
				}
			}else{	
				if(cbuf[i]=='-'){
					sign=true;
					i++;
				}
				for(;i<endIndex;i++){
					char c=cbuf[i];
					// If we only allow this to be called on integer values, the parsing is pre done!
					// if(c<'0'||c>'9')throw new LazyException("'"+getStringValue(source)+"' is not a valid integer",startIndex);
					value+='0'-c;
					if(i+1<endIndex){
						value*=10;
					}
				}
			}
			return sign?value:-value;
		}
		throw new LazyException("Not an integer",startIndex);
	}
765839
public int getInt(String key) throws JSONException {
    Object o = get(key);
    try {
      return o instanceof Number ? ((Number) o).intValue() : Integer.parseInt((String) o);
    } catch (Exception e) {
      throw new JSONException("JSONObject[" + quote(key) + "] is not an int.");
    }
  }
1362119
public static Integer getIntValue(Map<String, Object> yamlObject, String key, boolean allowsEmpty)
            throws YamlConvertException {
        Object obj = getObjectValue(yamlObject, key, allowsEmpty);
        if (obj == null && allowsEmpty) {
            return null;
        }
        String objStr;
        if (obj == null) {
            objStr = null;
        } else {
            objStr = obj.toString();
        }
        try {
            return new Integer(objStr);
        } catch (NumberFormatException e) {
            throw new YamlConvertException(String.format(MSG_VALUE_NOT_INT, key, objStr));
        }
    }
78853
public static int getInt(Object obj, String fieldName) {
        try {
            return getField(obj.getClass(), fieldName).getInt(obj);
        } catch (IllegalArgumentException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }
353228
@Override
    public Integer getInteger( final String     key,
                               final Integer    defaultValue )
    {
        return formatInteger( key, getFormattedPropValue( key ), defaultValue );
    }
357190
public static Object getFieldValue(Field field, Object obj) {
    try {
      return field.get(obj);
    } catch (IllegalAccessException e) {
      throw new IllegalArgumentException(e);
    }
  }
1207242
public int getIntProperty( String key , int defaultValue )
    {
        String value = SystemTools.replaceSystemProperties(settings.getProperty(key));
        if (value == null)
            return defaultValue;
        try
        {
            return Integer.parseInt(value);
        }
        catch (Exception e)
        {
            return defaultValue;
        }
    }