private static Number toNumber ( Object object ) { if ( object instanceof Number ) { return ( Number ) object ; } if ( object instanceof String ) { return Float . valueOf ( ( String ) object ) ; } throw new IllegalArgumentException ( "Use number or string" ) ; }
Convert object to number . To be backwards compatible with bound integers to properties where we now also want to accept floats now .