java.lang.Object | +--com.cedarspring.tvm.NumberOfPeriods
Number of Periods
Periods are evenly-spaced intervals of time. They are intentionally
not stated in years since each interval must correspond to an interest
compounding period.
This class will:
| Nested Class Summary | |
(package private) class |
NumberOfPeriods.SolveN
|
| Field Summary | |
(package private) static long |
serialVersionUID
|
private static java.math.BigDecimal |
UPPER_LIMIT
|
private java.math.BigDecimal |
value
|
| Constructor Summary | |
(package private) |
NumberOfPeriods()
|
| Method Summary | |
(package private) void |
computeValue(java.math.BigDecimal ip,
java.math.BigDecimal pmt,
java.math.BigDecimal fv,
java.math.BigDecimal pv,
boolean end,
Options o)
compute number of periods given interest, pmt, fv and pv The result will be rounded to an integer |
private java.math.BigDecimal |
fxEq0(java.math.BigDecimal x1,
java.math.BigDecimal x2,
Solve s,
Options o)
Solves f(x) = 0 by binary bisection |
(package private) java.math.BigDecimal |
getValue()
Recall number of periods |
(package private) void |
setValue(java.math.BigDecimal newValue)
Store a new value for number of periods. |
java.lang.String |
toString()
Return numberOfPeriods as a string |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private java.math.BigDecimal value
private static final java.math.BigDecimal UPPER_LIMIT
static final long serialVersionUID
| Constructor Detail |
NumberOfPeriods()
| Method Detail |
void setValue(java.math.BigDecimal newValue)
java.math.BigDecimal getValue()
void computeValue(java.math.BigDecimal ip,
java.math.BigDecimal pmt,
java.math.BigDecimal fv,
java.math.BigDecimal pv,
boolean end,
Options o)
public java.lang.String toString()
toString in class java.lang.Object
private java.math.BigDecimal fxEq0(java.math.BigDecimal x1,
java.math.BigDecimal x2,
Solve s,
Options o)
throws TVMException
TVMException