question: protected double safeDouble ( Map < String , Number > map , String key ) { Number val = map . get ( key ) ; if ( val == null ) return - 1 ; return val . doubleValue ( ) ; }
target:  Safely gets double value by given key.