private double getParamDouble ( String key , double defaultValue ) { String value = values . get ( key ) ; if ( value == null || value . isEmpty ( ) ) { return defaultValue ; } try { return Double . valueOf ( value ) ; } catch ( NumberFormatException e ) { throw new RuntimeException ( "Invalid double value: >>>" + value + "<<<" , e ) ; } }
Returns the double or the default is absent . Throws if the double is specified but invalid .