Documentation of 'org.jfin.date.accrual.AccrualPeriod' Java class
AccrualPeriod
org.jfin.date.accrual

Class AccrualPeriod

    • Constructor Detail

      • AccrualPeriod

        public AccrualPeriod()
        Default constructor
      • AccrualPeriod

        public AccrualPeriod(Period toCopy)
        Copy constructor
        Parameters:
        toCopy - the Period to copy
    • Method Detail

      • initialise

        public void initialise()
        Initialises the payment date after the start and end dates have been set.
        Specified by:
        initialise in interface Initialisable
      • getPaymentAmount

        public abstract double getPaymentAmount(double notional)
                                         throws java.lang.Exception
        Return the payment amount for a given notional
        Parameters:
        notional - The notional
        Returns:
        The payment amount for the given notional
        Throws:
        java.lang.Exception - Throws an Exception if there are problems calculating the payment amount
      • isPaymentPossible

        public abstract boolean isPaymentPossible()
      • getPaymentCalendar

        public java.util.Calendar getPaymentCalendar()
        Gets the payment date
        Returns:
        Calendar representing the payment date
      • setPaymentCalendar

        public void setPaymentCalendar(java.util.Calendar paymentCalendar)
        Sets the payment date
        Parameters:
        paymentCalendar - The Calendar representing the payment date
      • getPaymentType

        public PaymentType getPaymentType()
        Gets the payment type (IN_ARREARS, IN_ADVANCE) which determines whether the payment date is the start of the period (IN_ADVANCE) or the end of the period (IN_ARREARS).
        Returns:
        The payment type
      • setPaymentType

        public void setPaymentType(PaymentType paymentType)
        Sets the payment type (IN_ARREARS, IN_ADVANCE) which determines whether the payment date is the start of the period (IN_ADVANCE) or the end of the period (IN_ARREARS).
        Parameters:
        paymentType - The payment type
      • getPaymentBusinessDayConvention

        public BusinessDayConvention getPaymentBusinessDayConvention()
        Gets the business day convention used to adjust the payment date.
        Returns:
        The payment business day convention
      • setPaymentBusinessDayConvention

        public void setPaymentBusinessDayConvention(BusinessDayConvention paymentBusinessDayConvention)
        Sets the business day convention used to adjust the payment date.
        Parameters:
        paymentBusinessDayConvention - The payment business day convention
      • getAccrualBusinessDayConvention

        public BusinessDayConvention getAccrualBusinessDayConvention()
        Gets the accrual business day convention
        Returns:
        The accrual business day convention
      • setAccrualBusinessDayConvention

        public void setAccrualBusinessDayConvention(BusinessDayConvention accrualBusinessDayConvention)
        Sets the accrual business day convention
        Parameters:
        accrualBusinessDayConvention - The accrual business day convention
      • getPaymentHolidayCalendar

        public HolidayCalendar getPaymentHolidayCalendar()
        Gets the holiday calendar used to adjust the payment date.
        Returns:
        The payment holiday calendar
      • setPaymentHolidayCalendar

        public void setPaymentHolidayCalendar(HolidayCalendar paymentHolidayCalendar)
        Sets the holiday calendar used to adjust the payment date.
        Parameters:
        paymentHolidayCalendar - The payment holiday calendar
      • getAccrualHolidayCalendar

        public HolidayCalendar getAccrualHolidayCalendar()
        Gets the accrual holiday calendar
        Returns:
        The accrual holiday calendar
      • setAccrualHolidayCalendar

        public void setAccrualHolidayCalendar(HolidayCalendar accrualHolidayCalendar)
        Sets the accrual holiday calendar
        Parameters:
        accrualHolidayCalendar - The accrual holiday calendar
      • getDaycountCalculator

        public DaycountCalculator getDaycountCalculator()
        Gets the day count calculator used to calculate the value of the accrual period.
        Returns:
        The day count calculator
      • setDaycountCalculator

        public void setDaycountCalculator(DaycountCalculator daycountCalculator)
        Sets the day count calculator used to calculate the value of the accrual period.
        Parameters:
        daycountCalculator - The day count calculator
      • getAdjustedStartCalendar

        public java.util.Calendar getAdjustedStartCalendar()
                                                    throws AccrualException
        Returns the start calendar adjusted based upon the accrual holiday calendar and business day convention.
        Returns:
        The adjusted start calendar
        Throws:
        AccrualException - If the start calendar, payment business day convention or payment holiday are null
      • getAdjustedEndCalendar

        public java.util.Calendar getAdjustedEndCalendar()
                                                  throws AccrualException
        Returns the end calendar adjusted based upon the accrual holiday calendar and business day convention.
        Returns:
        The adjusted end calendar
        Throws:
        AccrualException - If the start calendar, payment business day convention or payment holiday are null
      • getAdjustedDaycountFraction

        public double getAdjustedDaycountFraction()
                                           throws AccrualException
        Gets the daycount fraction for the adjusted period.
        Returns:
        The day count fraction of the adjusted accrual period
        Throws:
        AccrualException - If there is a problem creating the adjusted day count fraction

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.