/*
Gets the int.

@param key the key

@return the int
183750
public int getInt(String key){
        try {
            return Integer.parseInt(resource.getString(key));
        } catch (NumberFormatException e) {
            return -1; // modify here if you need to throw a Exception here
        }
    }
1258145
public int getInteger(String key, int defaultValue) {
        int result = defaultValue;
        try {
            if (key != null)
                result = getInteger(key);
        } catch (MissingResourceException e) {
        }
        return result;
    }
729164
public int getInt(String name)
  {
    Integer value = (Integer) get(name);

    if (value != null)
      return value.intValue();
    else
      return 0;
  }
1101846
public int getIndex(Object key) {
    int[] nums = (int[]) cset.get(key);
    if (nums == null) {
      return -1;
    }
    else {
      return nums[1];
    }
  }
904532
public static Integer getKeyEvent(String key) throws NoSuchElementException
	{
		key = key.toUpperCase();
		Integer _result = theKeyTable.get(key);
		if (null == _result)
		{
			throw new NoSuchElementException(key);
		}
		return (_result);
	}
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;
	}
482308
public int getInt(String key) {
		addToDefaults(key, null);
		String value = getRequired(key);
		return Integer.parseInt(value);
	}
499201
public Integer getAsNullableInteger(String key) {
		Object value = getAsObject(key);
		return IntegerConverter.toNullableInteger(value);
	}
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.");
    }
  }
1015964
public int getInt(int key, int defaultValue) {
        if (key < 0) Kit.codeBug();
        int index = findIndex(key);
        if (0 <= index) {
            if (ivaluesShift != 0) {
                return keys[ivaluesShift + index];
            }
            return 0;
        }
        return defaultValue;
    }
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);
    }
90775
@CheckResult @NonNull
  public Preference<Integer> getInteger(@NonNull String key) {
    return getInteger(key, DEFAULT_INTEGER);
  }
651574
private int checkKey(Object key) {
	if (key == null) {
	    throw new NullPointerException("key cannot be null");
	} else if (!(key instanceof Integer)) {
	    throw new IllegalArgumentException("key must be an Integer");
	}
	else {
	    return ((Integer)key).intValue();
	}
    }
242007
public V get(Object key) {
        final int index = indexOfKey(key);
        return index >= 0 ? (V)mArray[(index<<1)+1] : null;
    }
185468
@Override
    public V get(Object key) {
        final int index = key == null ? indexOfNull() : indexOf(key, key.hashCode());
        return index >= 0 ? (V)mArray[(index<<1)+1] : null;
    }
1014138
public int getInt(String key) {
    	String value = get(key);
    	Utils.require(value != null, key + " parameter is not set");
    	try {
    		return Integer.parseInt(value);
        } catch (NumberFormatException e) {
            throw new IllegalArgumentException(key + " parameter should be a number");
        }
    }
1184595
@Override
    public final int getInt(final String key) {
        Integer result = optInt(key);
        if (result == null) {
            throw new ObjectMissingException(this, key);
        }
        return result;
    }