java.lang.Object  +com.cedarspring.tvm.AmortizationSchedule
The Amortization Schedule is a list of Amortization objects, each containing the principal, interest, and ending balance for one payment period.
The presentValue (beginning balance) and payment fields are rounded
to the current value of scale
before the schedule is created.
The interest per period is then multiplied by balance to
determine the interest for this period and the new balance. Due to
rounding, the final balance may not be exactly zero.
This class is normally constructed and returned by the
getAmortizationSchedule() method of the TVM bean as a
readonly object.
Field Summary  
private Options 
o
options 
private int 
periods
periods 
private java.math.BigDecimal[][] 
schedule
Amortization Schedule 
(package private) static long 
serialVersionUID

Constructor Summary  
(package private) 
AmortizationSchedule()
Create a new empty Amortization Schedule object. 
(package private) 
AmortizationSchedule(java.math.BigDecimal presentValue,
java.math.BigDecimal payment,
java.math.BigDecimal ip,
boolean payAtEnd,
int periods,
Options options)
Create a new Amortization Schedule containing the principal, interest, and balance for each period. 
Method Summary  
Amortization 
getAmortization(int period)
Get an Amortization object for a single period. 
Amortization 
getAmortization(int period1,
int period2)
Get an Amortization object for a range of periods. 
java.util.Enumeration 
getAmortizations()
Gets an enumeration of the periods in this schedule. 
int 
getPeriods()
Get the number of payment periods in the schedule. 
boolean 
isEmpty()
Test if the Schedule is empty 
Methods inherited from class java.lang.Object 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Field Detail 
private java.math.BigDecimal[][] schedule
private Options o
private int periods
static final long serialVersionUID
Constructor Detail 
AmortizationSchedule()
AmortizationSchedule(java.math.BigDecimal presentValue, java.math.BigDecimal payment, java.math.BigDecimal ip, boolean payAtEnd, int periods, Options options)
presentValue
 The beginning balance.payment
 Payment for each period.ip
 Interest rate per period. Enter as a
decimal (i.e 1% is entered as .01)payAtEnd
 Are payments made at end of period?periods
 The number of periods.options
 scale and rounding.
java.lang.IllegalArgumentException
 if a reference
to an object is null or if ip or periods is negative.Method Detail 
public Amortization getAmortization(int period)
Periods are numbered from 1  periods
.
java.lang.IndexOutOfBoundsException
 if schedule is empty or
index is < 1 or > periods
.public Amortization getAmortization(int period1, int period2)
Periods are numbered from 1  periods
.
java.lang.IndexOutOfBoundsException
 if schedule is empty or
an index is < 1 or > periods
.
java.lang.IllegalArgumentException
 if period1 > period2public int getPeriods()
public boolean isEmpty()
true
if the schedule is emptypublic java.util.Enumeration getAmortizations()