org.jfin.date.accrual.impl
Class FixedAccrualPeriod
- java.lang.Object
-
- org.jfin.date.Period
-
- org.jfin.date.accrual.AccrualPeriod
-
- org.jfin.date.accrual.impl.FixedAccrualPeriod
-
- All Implemented Interfaces:
- java.lang.Comparable, Initialisable
public class FixedAccrualPeriod extends AccrualPeriod
Concrete implementation of AccrualPeriod that models a Fixed Rate accrual period (e.g. a fixed rate Bond)
-
-
Constructor Summary
Constructors Constructor and Description FixedAccrualPeriod()Default constructorFixedAccrualPeriod(Period toCopy)Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description FixedAccrualPeriodclone()doublegetFixedRate()Returns the fixed rate of this perioddoublegetPaymentAmount(double notional)Gets the payment amount for this period for a given notionalbooleanisPaymentPossible()voidsetFixedRate(double fixedRate)Sets the fixed rate of this period-
Methods inherited from class org.jfin.date.accrual.AccrualPeriod
getAccrualBusinessDayConvention, getAccrualHolidayCalendar, getAdjustedDaycountFraction, getAdjustedEndCalendar, getAdjustedPaymentCalendar, getAdjustedStartCalendar, getDaycountCalculator, getPaymentBusinessDayConvention, getPaymentCalendar, getPaymentHolidayCalendar, getPaymentType, initialise, setAccrualBusinessDayConvention, setAccrualHolidayCalendar, setDaycountCalculator, setPaymentBusinessDayConvention, setPaymentCalendar, setPaymentHolidayCalendar, setPaymentType
-
Methods inherited from class org.jfin.date.Period
compareTo, getEndCalendar, getReferenceEndCalendar, getReferenceStartCalendar, getStartCalendar, setEndCalendar, setReferenceEndCalendar, setReferenceStartCalendar, setStartCalendar, toString
-
-
-
-
Constructor Detail
-
FixedAccrualPeriod
public FixedAccrualPeriod()
Default constructor
-
FixedAccrualPeriod
public FixedAccrualPeriod(Period toCopy)
Copy constructor- Parameters:
toCopy- The period to copy
-
-
Method Detail
-
clone
public FixedAccrualPeriod clone()
-
getFixedRate
public double getFixedRate()
Returns the fixed rate of this period- Returns:
- The fixed rate
-
setFixedRate
public void setFixedRate(double fixedRate)
Sets the fixed rate of this period- Parameters:
fixedRate- The fixed rate
-
getPaymentAmount
public double getPaymentAmount(double notional) throws java.lang.ExceptionGets the payment amount for this period for a given notional- Specified by:
getPaymentAmountin classAccrualPeriod- Parameters:
notional- The notional amount- Returns:
- The payment amount
- Throws:
java.lang.Exception- If there is a problem calculating the payment amount
-
isPaymentPossible
public boolean isPaymentPossible()
- Specified by:
isPaymentPossiblein classAccrualPeriod
-
-
DataMelt 3.0 © DataMelt by jWork.ORG