Class PaymentSchedule.Builder

  • All Implemented Interfaces:
    org.joda.beans.BeanBuilder<PaymentSchedule>
    Enclosing class:
    PaymentSchedule

    public static final class PaymentSchedule.Builder
    extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<PaymentSchedule>
    The bean-builder for PaymentSchedule.
    • Method Detail

      • get

        public Object get​(String propertyName)
        Specified by:
        get in interface org.joda.beans.BeanBuilder<PaymentSchedule>
        Overrides:
        get in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<PaymentSchedule>
      • paymentFrequency

        public PaymentSchedule.Builder paymentFrequency​(Frequency paymentFrequency)
        Sets the periodic frequency of payments.

        Regular payments will be made at the specified periodic frequency. The frequency must be the same as, or a multiple of, the accrual periodic frequency.

        Compounding applies if the payment frequency does not equal the accrual frequency.

        Parameters:
        paymentFrequency - the new value, not null
        Returns:
        this, for chaining, not null
      • businessDayAdjustment

        public PaymentSchedule.Builder businessDayAdjustment​(BusinessDayAdjustment businessDayAdjustment)
        Sets the business day adjustment to apply, optional.

        Each date in the calculated schedule is determined relative to the accrual schedule. Normally, the accrual schedule is adjusted ensuring each date is not a holiday. As such, there is typically no reason to adjust the date before applying the payment date offset.

        If the accrual dates are unadjusted, or for some other reason, it may be desirable to adjust the schedule dates before applying the payment date offset. This optional property allows that to happen. Note that the payment date offset itself provides the ability to adjust dates after the offset is applied.

        Parameters:
        businessDayAdjustment - the new value
        Returns:
        this, for chaining, not null
      • paymentRelativeTo

        public PaymentSchedule.Builder paymentRelativeTo​(PaymentRelativeTo paymentRelativeTo)
        Sets the base date that each payment is made relative to, defaulted to 'PeriodEnd'.

        The payment date is relative to either the start or end of the payment period.

        Parameters:
        paymentRelativeTo - the new value, not null
        Returns:
        this, for chaining, not null
      • paymentDateOffset

        public PaymentSchedule.Builder paymentDateOffset​(DaysAdjustment paymentDateOffset)
        Sets the offset of payment from the base calculation period date.

        The offset is applied to the unadjusted date specified by paymentRelativeTo. Offset can be based on calendar days or business days.

        Parameters:
        paymentDateOffset - the new value, not null
        Returns:
        this, for chaining, not null
      • compoundingMethod

        public PaymentSchedule.Builder compoundingMethod​(CompoundingMethod compoundingMethod)
        Sets the compounding method to use when there is more than one accrual period, defaulted to 'None'.

        Compounding is used when combining accrual periods.

        Parameters:
        compoundingMethod - the new value, not null
        Returns:
        this, for chaining, not null
      • firstRegularStartDate

        public PaymentSchedule.Builder firstRegularStartDate​(LocalDate firstRegularStartDate)
        Sets the optional start date of the first regular payment schedule period, which is the end date of the initial stub.

        This is used to identify the boundary date between the initial stub and the first regular period. In most cases there is no need to specify this as it can be worked out from other information. It must be used when there is a need to produce a payment schedule with an initial stub that combines an initial stub from the accrual schedule with the first regular period of the accrual schedule.

        This is an unadjusted date, and as such it might not be a valid business day. It must equal one of the unadjusted dates on the accrual schedule.

        If paymentRelativeTo is 'PeriodEnd' then this field corresponds to firstPaymentDate in FpML.

        Parameters:
        firstRegularStartDate - the new value
        Returns:
        this, for chaining, not null
      • lastRegularEndDate

        public PaymentSchedule.Builder lastRegularEndDate​(LocalDate lastRegularEndDate)
        Sets the optional end date of the last regular payment schedule period, which is the start date of the final stub.

        This is used to identify the boundary date between the last regular period and the final stub. In most cases there is no need to specify this as it can be worked out from other information. It must be used when there is a need to produce a payment schedule with a final stub that combines a final stub from the accrual schedule with the last regular period of the accrual schedule.

        This is used to identify the boundary date between the last regular schedule period and the final stub.

        This is an unadjusted date, and as such it might not be a valid business day. This date must be after 'firstPaymentDate'. It must equal one of the unadjusted dates on the accrual schedule.

        If paymentRelativeTo is 'PeriodEnd' then this field corresponds to lastRegularPaymentDate in FpML.

        Parameters:
        lastRegularEndDate - the new value
        Returns:
        this, for chaining, not null
      • toString

        public String toString()
        Overrides:
        toString in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<PaymentSchedule>