getBigDecimal

fun getBigDecimal(k: String, orElse: () -> BigDecimal = { throw NullPointerException("Key, $k, not found.") }): BigDecimal

Get a BigDecimal associated with requested key.

Return

The BigDecimal associated with requested key, or the result of applying orElse if k was not found.

Parameters

k

The key.

orElse

An optional function to run if k was not found. If not present, a NullPointerException is thrown if k was not found.

Throws

If the requested key is not present and orElse was omitted.

If the value associated with the requested key is not a BigDecimal.