com.cedarspring.tvm
Class Amortization

java.lang.Object
  |
  +--com.cedarspring.tvm.Amortization
All Implemented Interfaces:
java.io.Serializable

public class Amortization
extends java.lang.Object
implements java.io.Serializable

This class represents the amortization for one payment period or a range of periods. It contains the total principal and interest paid, and the final balance at the end of the period.

It is normally constructed and returned as a read-only object by the getAmortization(period1 [,period2]) method of the AmortizationSchedule class.

Version:
1.2.2 15-May-2003
Author:
Cedar Spring Software, Inc.
See Also:
Serialized Form

Field Summary
private  java.math.BigDecimal balance
           
private  java.math.BigDecimal interest
           
private  java.math.BigDecimal principal
           
 
Constructor Summary
(package private) Amortization()
          Create a new default Amortization object.
(package private) Amortization(java.math.BigDecimal principal, java.math.BigDecimal interest, java.math.BigDecimal balance)
          Create a new Amortization object containing the principal, interest, and balance for one period or a range of periods.
 
Method Summary
 java.math.BigDecimal getBalance()
          Get the remaining balance.
 java.math.BigDecimal getInterest()
          Get the interest portion of the payment(s).
 java.math.BigDecimal getPrincipal()
          Get the principal portion of the payment(s).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

principal

private java.math.BigDecimal principal

interest

private java.math.BigDecimal interest

balance

private java.math.BigDecimal balance
Constructor Detail

Amortization

Amortization()
Create a new default Amortization object. Principal, interest, and balance are 0.


Amortization

Amortization(java.math.BigDecimal principal,
             java.math.BigDecimal interest,
             java.math.BigDecimal balance)
Create a new Amortization object containing the principal, interest, and balance for one period or a range of periods. No checks are make for null values.

Parameters:
principal - Amount of the payment applied to principal.
interest - Amount of the payment applied to interest.
balance - Balance at the end of the period.
Method Detail

getPrincipal

public java.math.BigDecimal getPrincipal()
Get the principal portion of the payment(s).

Returns:
principal Principal portion of the payment.

getInterest

public java.math.BigDecimal getInterest()
Get the interest portion of the payment(s).

Returns:
interest Interest portion of the payment.

getBalance

public java.math.BigDecimal getBalance()
Get the remaining balance.

Returns:
balance Balance at end of period(s).