Class FraTemplate.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<FraTemplate>
-
- com.opengamma.strata.product.fra.type.FraTemplate.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<FraTemplate>
- Enclosing class:
- FraTemplate
public static final class FraTemplate.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<FraTemplate>
The bean-builder forFraTemplate
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FraTemplate
build()
FraTemplate.Builder
convention(FraConvention convention)
Sets the underlying FRA convention.Object
get(String propertyName)
FraTemplate.Builder
periodToEnd(Period periodToEnd)
Sets the period between the spot value date and the end date.FraTemplate.Builder
periodToStart(Period periodToStart)
Sets the period between the spot value date and the start date.FraTemplate.Builder
set(String propertyName, Object newValue)
FraTemplate.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<FraTemplate>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FraTemplate>
-
set
public FraTemplate.Builder set(String propertyName, Object newValue)
-
set
public FraTemplate.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<FraTemplate>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FraTemplate>
-
build
public FraTemplate build()
-
periodToStart
public FraTemplate.Builder periodToStart(Period periodToStart)
Sets the period between the spot value date and the start date.In a FRA described as '2 x 5', the period to the start date is 2 months.
- Parameters:
periodToStart
- the new value, not null- Returns:
- this, for chaining, not null
-
periodToEnd
public FraTemplate.Builder periodToEnd(Period periodToEnd)
Sets the period between the spot value date and the end date.In a FRA described as '2 x 5', the period to the end date is 5 months. The difference between the start date and the end date typically matches the tenor of the index, however this is not validated.
When building, this will default to the period to start plus the tenor of the index if not specified.
- Parameters:
periodToEnd
- the new value, not null- Returns:
- this, for chaining, not null
-
convention
public FraTemplate.Builder convention(FraConvention convention)
Sets the underlying FRA convention.This specifies the market convention of the FRA to be created.
- Parameters:
convention
- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FraTemplate>
-
-