@ ArgumentsChecked @ Throws ( IllegalNullArgumentException . class ) public static int checkLong ( @ Nonnull final Number number ) { Check . notNull ( number , "number" ) ; if ( ! isInLongRange ( number ) ) { throw new IllegalNumberRangeException ( number . toString ( ) , LONG_MIN , LONG_MAX ) ; } return number . intValue ( ) ; }
Checks if a given number is in the range of a long .