Class DaysAdjustment.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<DaysAdjustment>
-
- com.opengamma.strata.basics.date.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 forDaysAdjustment.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DaysAdjustment.Builderadjustment(BusinessDayAdjustment adjustment)Sets the business day adjustment that is performed to the result of the addition.DaysAdjustmentbuild()DaysAdjustment.Buildercalendar(HolidayCalendarId calendar)Sets the holiday calendar that defines the meaning of a day when performing the addition.DaysAdjustment.Builderdays(int days)Sets the number of days to be added.Objectget(String propertyName)DaysAdjustment.Builderset(String propertyName, Object newValue)DaysAdjustment.Builderset(org.joda.beans.MetaProperty<?> property, Object value)StringtoString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
getin interfaceorg.joda.beans.BeanBuilder<DaysAdjustment>- Overrides:
getin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<DaysAdjustment>
-
set
public DaysAdjustment.Builder set(String propertyName, Object newValue)
-
set
public DaysAdjustment.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
setin interfaceorg.joda.beans.BeanBuilder<DaysAdjustment>- Overrides:
setin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<DaysAdjustment>
-
build
public DaysAdjustment build()
-
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:
toStringin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<DaysAdjustment>
-
-