Class Swap.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<Swap>
-
- com.opengamma.strata.product.swap.Swap.Builder
-
- All Implemented Interfaces:
BeanBuilder<Swap>
- Enclosing class:
- Swap
public static final class Swap.Builder extends DirectFieldsBeanBuilder<Swap>
The bean-builder forSwap
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Swap
build()
java.lang.Object
get(java.lang.String propertyName)
Swap.Builder
legs(SwapLeg... legs)
Sets thelegs
property in the builder from an array of objects.Swap.Builder
legs(java.util.List<? extends SwapLeg> legs)
Sets the legs of the swap.Swap.Builder
set(java.lang.String propertyName, java.lang.Object newValue)
Swap.Builder
set(MetaProperty<?> property, java.lang.Object value)
java.lang.String
toString()
-
Methods inherited from class org.joda.beans.impl.direct.DirectFieldsBeanBuilder
get
-
-
-
-
Method Detail
-
get
public java.lang.Object get(java.lang.String propertyName)
- Specified by:
get
in interfaceBeanBuilder<Swap>
- Overrides:
get
in classDirectFieldsBeanBuilder<Swap>
-
set
public Swap.Builder set(java.lang.String propertyName, java.lang.Object newValue)
-
set
public Swap.Builder set(MetaProperty<?> property, java.lang.Object value)
- Specified by:
set
in interfaceBeanBuilder<Swap>
- Overrides:
set
in classDirectFieldsBeanBuilder<Swap>
-
build
public Swap build()
-
legs
public Swap.Builder legs(java.util.List<? extends SwapLeg> legs)
Sets the legs of the swap.A swap consists of one or more legs. The legs of a swap are essentially unordered, however it is more efficient and closer to user expectation to treat them as being ordered.
- Parameters:
legs
- the new value, not empty- Returns:
- this, for chaining, not null
-
legs
public Swap.Builder legs(SwapLeg... legs)
Sets thelegs
property in the builder from an array of objects.- Parameters:
legs
- the new value, not empty- Returns:
- this, for chaining, not null
-
toString
public java.lang.String toString()
- Overrides:
toString
in classDirectFieldsBeanBuilder<Swap>
-
-