|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.moneydance.apps.md.model.CurrencyUtil
public abstract class CurrencyUtil
Miscellaneous currency functions (mostly conversion).
Constructor Summary | |
---|---|
CurrencyUtil()
|
Method Summary | |
---|---|
static double |
convertToBasePrice(double priceFromCurr,
CurrencyType curr,
int date)
Convert the given price (in terms of the given currency) to a price in terms of the base currency. |
static long |
convertValue(long value,
CurrencyType fromCurrency,
CurrencyType toCurrency)
Return the amount of toCurrency that the given value of fromCurrency is currently worth. |
static long |
convertValue(long value,
CurrencyType fromCurrency,
CurrencyType toCurrency,
double userRate)
Return the amount of 'toCurrency' obtained by exchanging 'value' of 'fromCurrency' at the rate 'rate' |
static long |
convertValue(long value,
CurrencyType fromCurrency,
CurrencyType toCurrency,
int effectiveDate)
Return the amount of toCurrency that the given value of fromCurrency was worth on the given date. |
static CurrencyTable |
createDefaultTable(java.lang.String primaryCurrency)
|
static double |
getRawRate(CurrencyType fromCurrency,
CurrencyType toCurrency)
Get the raw (adjusted for decimal place differences) rate between the two currencies. |
static double |
getRawRate(CurrencyType fromCurrency,
CurrencyType toCurrency,
double userRate)
Convert the given user-identifiable rate to the 'raw' rate used to exchange amounts between the given two currencies. |
static double |
getRawRate(CurrencyType fromCurrency,
CurrencyType toCurrency,
int effectiveDate)
Get the raw (adjusted for decimal place differences) rate between the two currencies. |
static double |
getSplitAdjustedRelativeUserPrice(CurrencyType curr1,
CurrencyType curr2,
int date)
Get the price (going rate) for currency curr1 in terms of curr2 on the given date. |
static double |
getUserRate(CurrencyType fromCurrency,
CurrencyType toCurrency)
Get the current user-identifiable rate from fromCurrency to toCurrency. |
static double |
getUserRate(CurrencyType fromCurrency,
CurrencyType toCurrency,
double rawRate)
Convert the given raw rate to the user-identifiable rate used to exchange amounts between the given two currencies. |
static double |
getUserRate(CurrencyType fromCurrency,
CurrencyType toCurrency,
int effectiveDate)
Get the raw (adjusted for decimal place differences) rate between the two currencies. |
static void |
main(java.lang.String[] argv)
Retrieve the latest exchange rates |
static void |
sortCurrencyList(CurrencyType[] list)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CurrencyUtil()
Method Detail |
---|
public static double getRawRate(CurrencyType fromCurrency, CurrencyType toCurrency, int effectiveDate)
public static double getUserRate(CurrencyType fromCurrency, CurrencyType toCurrency, int effectiveDate)
public static double getRawRate(CurrencyType fromCurrency, CurrencyType toCurrency)
public static double convertToBasePrice(double priceFromCurr, CurrencyType curr, int date)
public static double getRawRate(CurrencyType fromCurrency, CurrencyType toCurrency, double userRate)
public static double getUserRate(CurrencyType fromCurrency, CurrencyType toCurrency, double rawRate)
public static double getUserRate(CurrencyType fromCurrency, CurrencyType toCurrency)
public static long convertValue(long value, CurrencyType fromCurrency, CurrencyType toCurrency)
public static long convertValue(long value, CurrencyType fromCurrency, CurrencyType toCurrency, double userRate)
public static long convertValue(long value, CurrencyType fromCurrency, CurrencyType toCurrency, int effectiveDate)
public static double getSplitAdjustedRelativeUserPrice(CurrencyType curr1, CurrencyType curr2, int date)
public static void main(java.lang.String[] argv) throws java.lang.Exception
java.lang.Exception
public static CurrencyTable createDefaultTable(java.lang.String primaryCurrency)
public static void sortCurrencyList(CurrencyType[] list)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |