Package com.opengamma.strata.basics.date
Class PeriodAdjustment.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<PeriodAdjustment>
-
- com.opengamma.strata.basics.date.PeriodAdjustment.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<PeriodAdjustment>
- Enclosing class:
- PeriodAdjustment
public static final class PeriodAdjustment.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<PeriodAdjustment>
The bean-builder forPeriodAdjustment.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PeriodAdjustment.BuilderadditionConvention(PeriodAdditionConvention additionConvention)Sets the addition convention to apply.PeriodAdjustment.Builderadjustment(BusinessDayAdjustment adjustment)Sets the business day adjustment that is performed to the result of the addition.PeriodAdjustmentbuild()Objectget(String propertyName)PeriodAdjustment.Builderperiod(Period period)Sets the period to be added.PeriodAdjustment.Builderset(String propertyName, Object newValue)PeriodAdjustment.Builderset(org.joda.beans.MetaProperty<?> property, Object value)StringtoString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
getin interfaceorg.joda.beans.BeanBuilder<PeriodAdjustment>- Overrides:
getin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<PeriodAdjustment>
-
set
public PeriodAdjustment.Builder set(String propertyName, Object newValue)
-
set
public PeriodAdjustment.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
setin interfaceorg.joda.beans.BeanBuilder<PeriodAdjustment>- Overrides:
setin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<PeriodAdjustment>
-
build
public PeriodAdjustment build()
-
period
public PeriodAdjustment.Builder period(Period period)
Sets the period to be added.When the adjustment is performed, this period will be added to the input date.
- Parameters:
period- the new value, not null- Returns:
- this, for chaining, not null
-
additionConvention
public PeriodAdjustment.Builder additionConvention(PeriodAdditionConvention additionConvention)
Sets the addition convention to apply.When the adjustment is performed, this convention is used to refine the adjusted date. The most common convention is to move the end date to the last business day of the month if the start date is the last business day of the month.
- Parameters:
additionConvention- the new value, not null- Returns:
- this, for chaining, not null
-
adjustment
public PeriodAdjustment.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 addition calculation.
If no adjustment is required, use the 'None' business day adjustment.
- 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<PeriodAdjustment>
-
-