@ ArgumentsChecked @ Throws ( IllegalNullArgumentException . class ) public static float checkFloat ( @ Nonnull final Number number ) { Check . notNull ( number , "number" ) ; if ( ! isInFloatRange ( number ) ) { throw new IllegalNumberRangeException ( number . toString ( ) , FLOAT_MIN , FLOAT_MAX ) ; } return number . floatValue ( ) ; }
Checks if a given number is in the range of a float .