Interface PrecisionManager
public interface PrecisionManager
To provide an implementation of this class please see
BarracudaOverridesModule
Instances of this class are invoked when the spot rate dps is required. Such a dps is not always present during the exchange of messages between the adapter and the Barracuda OMS and needs to be provided so that parts of the spec that require a spot rate DPS, have that information at hand when required.
-
Method Summary
Modifier and TypeMethodDescriptionintgetAmountDPS(String currency) Should return the precision of an amount/quantity, quoted as the 'scale' of the value: the number of significant figures to the right of the quantity's decimal point.intgetSpotRateDPS(String currencyPair) Should return the precision of the spot rate, quoted as the 'scale' of the value: the number of significant figures to the right of the spot rate's decimal point.intgetSpotRatePipMultiplier(String currencyPair) This is the standard number of decimal places for a rate.
-
Method Details
-
getSpotRateDPS
Should return the precision of the spot rate, quoted as the 'scale' of the value: the number of significant figures to the right of the spot rate's decimal point.- Parameters:
currencyPair-- Returns:
- Precision of the spot rate, quoted as the 'scale' of the value: the number of significant figures to the right of the spot rate's decimal point.
-
getSpotRatePipMultiplier
This is the standard number of decimal places for a rate. This is the value userd to convert to and from a pips value. It is also the number of decimals you would round for display assuming no fractional pips.eg. if 4 precision = (10^-4 = 0.0000)
- Parameters:
currencyPair-
-
getAmountDPS
Should return the precision of an amount/quantity, quoted as the 'scale' of the value: the number of significant figures to the right of the quantity's decimal point.- Parameters:
currency-- Returns:
- Precision of the quantity, quoted as the 'scale' of the value: the number of significant figures to the right of the quantity's decimal point.
-