Gets the int.

@param key the key
@param def the def
@return the int
@see java.util.prefs.Preferences#getInt(java.lang.String, int)
161727
public static int getInt(final String key, final int def) {
		try {
			return systemRoot.getInt(fixKey(key), def);
		} catch (final Exception e) {
			// just eat the exception to avoid any system crash on system issues
			return def;
		}
	}
548906
public double[] getDoubleArray(final String key, final double[] def) {
		try {
			final double[] result = getDoubleArray(key);
			return result != null ? result : def;
		} catch (final NumberFormatException nfe) {
			return def;
		}
	}
490555
public static final Integer getInteger(Locale locale, String key)
   {
      ResourceBundle bundle = ResourceBundle.getBundle(LocaleData.class.getName(), locale);
      return ((Integer) bundle.getObject(key));
   }
102392
public double getDouble(String key, double def) {
        Object tmp = objectMap.get(key);
        return tmp != null && tmp instanceof Number ? ((Number) tmp)
                .doubleValue() : def;
    }
613210
def get_int(self, key, default=None):
        
        value = self.get(key, default)
        return None if value is None else int(value)
1147797
public int[] getIntArray(final String key, final int[] def) {
		try {
			final int[] result = getIntArray(key);
			return result != null ? result : def;
		} catch (final NumberFormatException nfe) {
			return def;
		}
	}
720917
public int getInt(int index, int def) {
        Object tmp = mArray.get(index);
        return tmp != null && tmp instanceof Number ? ((Number) tmp).intValue()
                : def;
    }
501311
public int getRequiredInt(String key) {
        Optional<Integer> value = getInteger(key);
        if (value.isPresent()) {
            return value.get();
        }
        throw new IllegalStateException(String.format("required key [%s] not found", key));
    }
286306
public int getInt(String key) throws JSONException {
        Object object = this.get(key);
        try {
            return object instanceof Number ? ((Number) object).intValue()
                    : Integer.parseInt((String) object);
        } catch (Exception e) {
            throw new JSONException("JSONObject[" + quote(key)
                    + "] is not an int.");
        }
    }
275290
public Long getInteger(int key) {
        PebbleTuple tuple = getTuple(key, PebbleTuple.TupleType.INT);
        if (tuple == null) {
            return null;
        }
        return (Long) tuple.value;
    }
379795
public static String getProperty( Properties props, String key, String def )
    {
        String value = props.getProperty( key, def );
        if( value == null )
        {
            return null;
        }
        if( "".equals( value ) )
        {
            return value;
        }
        value = PropertyResolver.resolve( props, value );
        return value;
    }
745799
@Override
    public Integer getInteger(final String key) {
        return retrieve(new Callable<Integer>() {
            @Override
            public Integer call() throws Exception {
                return configuration.getInt(key);
            }
        }, null);
    }
58034
public static Integer getIntegerProperty(String key, boolean required) {
		Integer value = null;
		String stringValue = getProperty(key, required);
		if (stringValue != null) {
			value = Integer.valueOf(stringValue);
		}
		return value;
	}
743216
public byte[] getByteArray(final String key, final byte[] def) {
		try {
			final byte[] result = getByteArray(key);
			return result != null ? result : def;
		} catch (final NumberFormatException nfe) {
			return def;
		}
	}
729164
public int getInt(String name)
  {
    Integer value = (Integer) get(name);

    if (value != null)
      return value.intValue();
    else
      return 0;
  }
903199
public static int getInt( String key, int def ) {
        String s = prp.getProperty( key );
        if( s != null ) {
            try {
                def = Integer.parseInt( s );
            } catch( NumberFormatException nfe ) {
                if( log.level > 0 )
                    nfe.printStackTrace( log );
            }
        }
        return def;
    }
482308
public int getInt(String key) {
		addToDefaults(key, null);
		String value = getRequired(key);
		return Integer.parseInt(value);
	}