protected Double getDoubleParam ( String paramName , String errorMessage , Map < String , Object > mapToUse ) throws IOException { Object o = mapToUse . get ( paramName ) ; if ( o != null ) { try { return Double . parseDouble ( o . toString ( ) ) ; } catch ( NumberFormatException ignored ) { } } return getTypedParam ( paramName , errorMessage , Double . class , mapToUse ) ; }
Convenience method for subclasses . Retrieves a double with the given parametername even if that parametercontent is actually a string containing a number or a long or an int or ... Anything that can be converted to a double is returned .