public class CurrencyTable
extends java.lang.Object
| Constructor and Description |
|---|
CurrencyTable() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCurrencyListener(CurrencyListener listener) |
void |
addCurrencyType(CurrencyType newType) |
boolean |
contains(CurrencyType curr) |
static double |
convertToBasePrice(double priceFromCurr,
CurrencyType curr,
long 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,
long effectiveDate)
Return the amount of toCurrency that the given value of fromCurrency
was worth on the given date.
|
long |
convertValueXXX(long value,
CurrencyType currentType,
CurrencyType newType)
Convert value in one currency to the same value in another currency.
|
static CurrencyTable |
createDefaultTable(java.lang.String primaryCurrency) |
static CurrencyTable |
createDefaultTable(java.lang.String primaryCurrency,
boolean singleCurrency) |
void |
dumpCurrencies() |
void |
fireCurrencyTableModified() |
CurrencyType[] |
getAllCurrencies() |
java.util.Enumeration |
getAllValues() |
CurrencyType |
getBaseType() |
CurrencyType |
getCurrencyByID(int id) |
CurrencyType |
getCurrencyByIDString(java.lang.String typeID) |
CurrencyType |
getCurrencyByName(java.lang.String name) |
CurrencyType |
getCurrencyByTickerSymbol(java.lang.String ticker) |
long |
getCurrencyCount() |
int |
getNextID() |
static double |
getRawRate(CurrencyType fromCurrency,
CurrencyType toCurrency)
Deprecated.
use CurrencyUtil.getRawRate(CurrencyType, CurrencyType) instead
|
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,
long effectiveDate)
Deprecated.
use CurrencyUtil.getRawRate(CurrencyType, CurrencyType, int) instead
|
double |
getRelativePrice(CurrencyType curr1,
CurrencyType curr2,
long date)
Deprecated.
use getRelativePrice(CurrencyType, CurrencyType, int) instead
|
double |
getRelativePriceInt(CurrencyType curr1,
CurrencyType curr2,
int date)
Get the price (going rate) for currency curr1 in terms of curr2 on the given date.
|
double |
getSplitAdjustedRelativePrice(CurrencyType curr1,
CurrencyType curr2,
long date)
Deprecated.
use CurrencyUtil.getSplitAdjustedRelativePrice(...) instead
|
java.lang.String |
getUniqueCurrId(java.lang.String ticker) |
static double |
getUserRate(CurrencyType fromCurrency,
CurrencyType 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,
long effectiveDate)
Deprecated.
use CurrencyUtil.getUserRate(CurrencyType, CurrencyType, int) instead
|
boolean |
isDirty() |
void |
removeCurrencyListener(CurrencyListener listener) |
void |
removeCurrencyType(CurrencyType type) |
void |
resetDirtyFlags() |
void |
setBaseType(CurrencyType newBaseType) |
void |
setFireNotifications(boolean doNotifications)
Tells the model whether or not notifications should be
sent or delayed for a little while.
|
void |
setRootAccount(RootAccount rootAccount) |
static void |
sortCurrencyList(CurrencyType[] list) |
public void addCurrencyListener(CurrencyListener listener)
public void removeCurrencyListener(CurrencyListener listener)
public void fireCurrencyTableModified()
public void setFireNotifications(boolean doNotifications)
public CurrencyType getBaseType()
public final boolean contains(CurrencyType curr)
public void setBaseType(CurrencyType newBaseType)
public CurrencyType[] getAllCurrencies()
public int getNextID()
public CurrencyType getCurrencyByID(int id)
public CurrencyType getCurrencyByIDString(java.lang.String typeID)
public CurrencyType getCurrencyByTickerSymbol(java.lang.String ticker)
public CurrencyType getCurrencyByName(java.lang.String name)
public void addCurrencyType(CurrencyType newType)
public void removeCurrencyType(CurrencyType type)
public void setRootAccount(RootAccount rootAccount)
public long getCurrencyCount()
public java.lang.String getUniqueCurrId(java.lang.String ticker)
public void resetDirtyFlags()
public static final double getRawRate(CurrencyType fromCurrency, CurrencyType toCurrency, long effectiveDate)
public static final double getUserRate(CurrencyType fromCurrency, CurrencyType toCurrency, long effectiveDate)
public static final double getRawRate(CurrencyType fromCurrency, CurrencyType toCurrency)
public final double getRelativePrice(CurrencyType curr1, CurrencyType curr2, long date)
public final double getRelativePriceInt(CurrencyType curr1, CurrencyType curr2, int date)
public final double getSplitAdjustedRelativePrice(CurrencyType curr1, CurrencyType curr2, long date)
public static final double convertToBasePrice(double priceFromCurr,
CurrencyType curr,
long date)
public static final double getRawRate(CurrencyType fromCurrency, CurrencyType toCurrency, double userRate)
public static final double getUserRate(CurrencyType fromCurrency, CurrencyType toCurrency, double rawRate)
public static final double getUserRate(CurrencyType fromCurrency, CurrencyType toCurrency)
public static final long convertValue(long value,
CurrencyType fromCurrency,
CurrencyType toCurrency)
public static final long convertValue(long value,
CurrencyType fromCurrency,
CurrencyType toCurrency,
double userRate)
public static final long convertValue(long value,
CurrencyType fromCurrency,
CurrencyType toCurrency,
long effectiveDate)
public void dumpCurrencies()
public long convertValueXXX(long value,
CurrencyType currentType,
CurrencyType newType)
public java.util.Enumeration getAllValues()
public boolean isDirty()
public static CurrencyTable createDefaultTable(java.lang.String primaryCurrency)
public static CurrencyTable createDefaultTable(java.lang.String primaryCurrency, boolean singleCurrency)
public static final void sortCurrencyList(CurrencyType[] list)