protected double safeDouble(Map<String,Number> map,String key){
  Number val=map.get(key);
  if (val == null)   return -1;
  return val.doubleValue();
}

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