@ArgumentsChecked
	@Throws(IllegalNullArgumentException.class)
	public static int checkInteger(@Nonnull final Number number) {
		Check.notNull(number, "number");
		if (!isInIntegerRange(number)) {
			throw new IllegalNumberRangeException(number.toString(), INTEGER_MIN, INTEGER_MAX);
		}

		return number.intValue();
	}
@ ArgumentsChecked @ Throws ( IllegalNullArgumentException . class ) public static int checkInteger ( @ Nonnull final Number number ) { Check . notNull ( number , "number" ) ; if ( ! isInIntegerRange ( number ) ) { throw new IllegalNumberRangeException ( number . toString ( ) , INTEGER_MIN , INTEGER_MAX ) ; } return number . intValue ( ) ; }
Checks if a given number is in the range of an integer.

@param number
a number which should be in the range of an integer (positive or negative)

@see java.lang.Integer#MIN_VALUE
@see java.lang.Integer#MAX_VALUE

@return number as an integer (rounding might occur)