public class ROICashFlowEntry extends java.lang.Object implements java.lang.Comparable<ROICashFlowEntry>
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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.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>