Constructs an optional rate from a given identifier.
Constructs an optional rate from a given identifier. -1
denotes the UndefinedRate
, values >= 0
denote the identifier of a defined rate.
Calculates the maximum rate among a list of optional rates.
Calculates the maximum rate among a list of optional rates. If the list is empty or contains
at least one UndefinedRate
, the return value is also UndefinedRate
.
Calculates the minimum rate among a list of optional rates.
Calculates the minimum rate among a list of optional rates. If the list is empty or contains
at least one UndefinedRate
, the return value is also UndefinedRate
.
Reduces a list of optional rates to one value.
Reduces a list of optional rates to one value. If the list is empty or contains different rates,
the return value is UndefinedRate
. Otherwise, if all elements are equal, returns that one rate.