Constructor.
the identifier
the amount
Optional exponent: numbera base-10 exponent to interpret amount in; if not provided then 0 is assumed
Optional description: stringa description
Private #amountPrivate #descriptionPrivate #exponentPrivate #idGet the amount.
Get the description.
Get the exponent.
Get the identifier.
Static parseParse locale string values into a TariffRate instance.
the locale to parse the amount and exponent string values as
the identifier
the amount, as a number string in the locale locale
Optional exponent: stringa base-10 exponent to interpret amount in, as a number string
in the locale locale; if not provided then 0 is assumed
Optional description: stringa description
the new instance
TypeError if the amount or exponent can not be parsed as numbers
Generated using TypeDoc
An identifiable tariff rate.
Remarks
The
exponentproperty can be used to maintain precision inamount. For example an amount of1.23could be expressed as123with anexponentof-2.