Effective value as {@code int}.
@return the value as {@code int}. If the property does not have value nor default value, then {@code 0} is returned.
@throws NumberFormatException if value is not empty and is not a parsable integer
973444
public int getInt(String key) {
    String value = getString(key);
    if (StringUtils.isNotEmpty(value)) {
      return Integer.parseInt(value);
    }
    return 0;
  }
1331563
@Override
    public int asInt() {
        final Class<?> callerClass = ReflectionHelper.getDirectCallerClass();
        return evaluateSingeValue(Integer.TYPE, callerClass);
    }
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;
        }
    }
412274
public int getInt(Enum<?> key, int defaultValue)
    {
        if (key == null)
        {
            return defaultValue;
        }

        return getInt(key.name(), defaultValue);
    }
372342
private static int getProperty(String prefix, String name, int defaultValue) {
        int result = defaultValue;

        try {
            result = Integer.parseInt(System.getProperty(prefix + name));
        } catch (NumberFormatException e) {
            LOG.warn("Value for " + prefix + name + " must be an integer. Using default " + defaultValue);
        }
        return result;
    }
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;
    }
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;
    }
1256744
@Override
    public int getInt( final String    key,
                       final int       defaultValue )
    {
        return formatInt( key, getFormattedPropValue( key ), defaultValue );
    }
902924
public IntegerConstant getIntegerByValue(int value)
  {
    for (int i = 0; i < _entries.size(); i++) {
      ConstantPoolEntry entry = _entries.get(i);

      if (! (entry instanceof IntegerConstant))
        continue;

      IntegerConstant integerEntry = (IntegerConstant) entry;

      if (integerEntry.getValue() == value)
        return integerEntry;
    }

    return null;
  }
1373358
public Integer getInt(String key, Integer defaultValue) throws SyntaxException
    {
        String value = getSimple(key);
        return toInt(key, value, defaultValue);
    }
315648
public int getInt(final String key) {
		final String value = getProperty(key);
		if (value == null) {
			throw new NumberFormatException("Couldn't parse property to int.");
		}
		return Integer.parseInt(value);
	}
1316104
public int getInt(int columnIndex) {
		Object fieldValue = data[columnIndex];
		if (fieldValue == null) {
			return 0;
		}
		if (fieldValue instanceof Number) {
			return ((Number) fieldValue).intValue();
		}
		throw new DBFException("Unsupported type for Number at column:" + columnIndex + " "
				+ fieldValue.getClass().getCanonicalName());
	}
209392
public int toInteger() throws NumberFormatException {
        int res = 0;
        byte currChar;
        int i=1;
        currChar=chars[pos];
        boolean isMinus=false;
        
        if(currChar==minus_byte)
        	isMinus=true;
        else if(currChar>=zero_byte && currChar<=nine_byte)
    		res+=currChar-zero_byte;
    	else
    		throw new NumberFormatException("value is not numeric");
    	
        for (; i < len; i++) {
        	currChar=chars[pos+i];        		
        	if(currChar>=zero_byte && currChar<=nine_byte)
        	{
        		res*=10;
        		res+=currChar-zero_byte;
        	}        
        	else
        		throw new NumberFormatException("value is not numeric");
        }
        
        if(isMinus)
        	return 0-res;
        else
        	return res;
    }
304786
public double getNumericValue(Part part) {
        Part.Type type=part.type;
        if(type==Part.Type.ARG_INT) {
            return part.value;
        } else if(type==Part.Type.ARG_DOUBLE) {
            return numericValues.get(part.value);
        } else {
            return NO_NUMERIC_VALUE;
        }
    }
1311134
@Override
    public int intValue() {
	if (Math.abs(amount) <= Integer.MAX_VALUE) {
	    return (int) amount;
	}
	throw new IllegalStateException("Amount of '" + amount + "' cannot be converted into an Integer.");
    }
845618
public static final Integer parseInteger(String value)
   {
      return (value == null || value.length() == 0 ? null : Integer.valueOf(Integer.parseInt(value)));
   }
264646
public static int parseInt(String num, int defaultInt) {
        if (num == null) {
            return defaultInt;
        } else {
            try {
                return Integer.parseInt(num);
            } catch (Exception e) {
                return defaultInt;
            }
        }
    }