Class DaysAdjustment.Builder

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

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

      • get

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

        public DaysAdjustment.Builder days​(int days)
        Sets the number of days to be added.

        When the adjustment is performed, this amount will be added to the input date using the calendar to determine the addition type.

        Parameters:
        days - the new value, not null
        Returns:
        this, for chaining, not null
      • calendar

        public DaysAdjustment.Builder calendar​(HolidayCalendarId calendar)
        Sets the holiday calendar that defines the meaning of a day when performing the addition.

        When the adjustment is performed, this calendar is used to determine which days are business days.

        If the holiday calendar is 'None' then addition uses simple date addition arithmetic without considering any days as holidays or weekends. If the holiday calendar is anything other than 'None' then addition uses that calendar, effectively repeatedly finding the next business day.

        See the class-level documentation for more information.

        Parameters:
        calendar - the new value, not null
        Returns:
        this, for chaining, not null
      • adjustment

        public DaysAdjustment.Builder adjustment​(BusinessDayAdjustment adjustment)
        Sets the business day adjustment that is performed to the result of the addition.

        This adjustment is applied to the result of the period addition calculation. If the addition is performed using business days then any adjustment here is expected to have a different holiday calendar to that used during addition.

        If no adjustment is required, use the 'None' business day adjustment.

        See the class-level documentation for more information.

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

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