|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.moneydance.apps.md.model.ROICashFlowEntry
public class ROICashFlowEntry
Tracks a transaction for Return On Investment/Internal Rate of Return computations. This class tracks the date of the cash flow entry (which should be like a deposit or withdrawal for a bank: do not include investment income entries) and the amount, as well as the number of days between the transaction and the end of the reporting period.
This class is immutable.
Constructor Summary | |
---|---|
ROICashFlowEntry(int dateInt,
long value,
CurrencyType investCurr,
int startDateInt)
Constructor to allow all fields to be final. |
|
ROICashFlowEntry(SplitTxn splitTxn,
InvestTxnType txnType,
CurrencyType investCurr,
int startDateInt)
Constructor from a security transaction. |
Method Summary | |
---|---|
double |
annumsInPeriod()
|
int |
compareTo(ROICashFlowEntry other)
|
static long |
getCashFlowAmount(SplitTxn splitTxn,
InvestTxnType txnType,
CurrencyType investCurr)
Determine the amount of a transaction that is appropriate for a cash flow series for an ROI computation. |
int |
getDateInt()
|
double |
getValue()
|
void |
setStartDate(int startDateInt)
Define the start date and thus compute/recompute the number of years to the end. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ROICashFlowEntry(SplitTxn splitTxn, InvestTxnType txnType, CurrencyType investCurr, int startDateInt)
splitTxn
- The transaction to be analyzed.txnType
- The type of transactioninvestCurr
- Currency to use (dollars, euro, etc., not shares).startDateInt
- The start of the reporting period.public ROICashFlowEntry(int dateInt, long value, CurrencyType investCurr, int startDateInt)
dateInt
- The entry's date.value
- The entry's value as a long, already expressed in terms of the
destination currency (investCurr
).investCurr
- Currency to use (dollars, euro, etc., not shares).startDateInt
- The start of the reporting period.Method Detail |
---|
public final void setStartDate(int startDateInt)
startDateInt
- The new period start date to specify.public static long getCashFlowAmount(SplitTxn splitTxn, InvestTxnType txnType, CurrencyType investCurr)
splitTxn
- The transaction to use.txnType
- The type of investment transaction.investCurr
- The currency of the investment account cash portion (dollars).
public double getValue()
public double annumsInPeriod()
public int getDateInt()
public int compareTo(ROICashFlowEntry other)
compareTo
in interface java.lang.Comparable<ROICashFlowEntry>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |