public Number getAsNumber ( String key ) { Object obj = this . get ( key ) ; if ( obj == null ) return null ; if ( obj instanceof Number ) return ( Number ) obj ; return Long . valueOf ( obj . toString ( ) ) ; }
A Simple Helper cast an Object to an Number