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.Builder
additionConvention(PeriodAdditionConvention additionConvention)
Sets the addition convention to apply.PeriodAdjustment.Builder
adjustment(BusinessDayAdjustment adjustment)
Sets the business day adjustment that is performed to the result of the addition.PeriodAdjustment
build()
Object
get(String propertyName)
PeriodAdjustment.Builder
period(Period period)
Sets the period to be added.PeriodAdjustment.Builder
set(String propertyName, Object newValue)
PeriodAdjustment.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
String
toString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<PeriodAdjustment>
- Overrides:
get
in 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:
set
in interfaceorg.joda.beans.BeanBuilder<PeriodAdjustment>
- Overrides:
set
in 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:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<PeriodAdjustment>
-
-