public BigDecimal optBigDecimal ( String key , BigDecimal defaultValue ) { try { return this . getBigDecimal ( key ) ; } catch ( Exception e ) { return defaultValue ; } }
Get an optional BigDecimal associated with a key or the defaultValue if there is no such key or if its value is not a number . If the value is a string an attempt will be made to evaluate it as a number .