Class NotionalSchedule.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<NotionalSchedule>
-
- com.opengamma.strata.product.swap.NotionalSchedule.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<NotionalSchedule>
- Enclosing class:
- NotionalSchedule
public static final class NotionalSchedule.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<NotionalSchedule>
The bean-builder forNotionalSchedule
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NotionalSchedule.Builder
amount(ValueSchedule amount)
Sets the notional amount.NotionalSchedule
build()
NotionalSchedule.Builder
currency(Currency currency)
Sets the currency of the swap leg associated with the notional.NotionalSchedule.Builder
finalExchange(boolean finalExchange)
Sets the flag indicating whether to exchange the final notional.NotionalSchedule.Builder
fxReset(FxResetCalculation fxReset)
Sets the FX reset definition, optional.Object
get(String propertyName)
NotionalSchedule.Builder
initialExchange(boolean initialExchange)
Sets the flag indicating whether to exchange the initial notional.NotionalSchedule.Builder
intermediateExchange(boolean intermediateExchange)
Sets the flag indicating whether to exchange the differences in the notional during the lifetime of the swap.NotionalSchedule.Builder
set(String propertyName, Object newValue)
NotionalSchedule.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<NotionalSchedule>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<NotionalSchedule>
-
set
public NotionalSchedule.Builder set(String propertyName, Object newValue)
-
set
public NotionalSchedule.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<NotionalSchedule>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<NotionalSchedule>
-
build
public NotionalSchedule build()
-
currency
public NotionalSchedule.Builder currency(Currency currency)
Sets the currency of the swap leg associated with the notional.This is the currency of the swap leg and the currency that interest calculation is made in.
The amounts of the notional are usually expressed in terms of this currency, however they can be converted from amounts in a different currency. See the optional
fxReset
property.- Parameters:
currency
- the new value, not null- Returns:
- this, for chaining, not null
-
fxReset
public NotionalSchedule.Builder fxReset(FxResetCalculation fxReset)
Sets the FX reset definition, optional.This property is used when the defined amount of the notional is specified in a currency other than the currency of the swap leg. When this occurs, the notional amount has to be converted using an FX rate to the swap leg currency. This conversion occurs at each payment period boundary and usually corresponds to an actual exchange of money between the counterparties.
When building the notional schedule, if an
FxResetCalculation
is present, then at least one of the notional exchange flags should be set to true. If all notional exchange flags are false then an IllegalArgumentException is thrown.- Parameters:
fxReset
- the new value- Returns:
- this, for chaining, not null
-
amount
public NotionalSchedule.Builder amount(ValueSchedule amount)
Sets the notional amount.This defines the notional as an initial amount and a list of adjustments. The notional expressed here is intended to always be positive.
The notional is only allowed to change at payment period boundaries. As such, the
ValueSchedule
steps are defined relative to the payment schedule.- Parameters:
amount
- the new value, not null- Returns:
- this, for chaining, not null
-
initialExchange
public NotionalSchedule.Builder initialExchange(boolean initialExchange)
Sets the flag indicating whether to exchange the initial notional.Setting this to true indicates that the notional is transferred at the start of the trade. This should typically be set to true in the case of an FX reset swap, or one with a varying notional.
- Parameters:
initialExchange
- the new value- Returns:
- this, for chaining, not null
-
intermediateExchange
public NotionalSchedule.Builder intermediateExchange(boolean intermediateExchange)
Sets the flag indicating whether to exchange the differences in the notional during the lifetime of the swap.Setting this to true indicates that the notional is transferred when it changes during the trade. This should typically be set to true in the case of an FX reset swap, or one with a varying notional.
- Parameters:
intermediateExchange
- the new value- Returns:
- this, for chaining, not null
-
finalExchange
public NotionalSchedule.Builder finalExchange(boolean finalExchange)
Sets the flag indicating whether to exchange the final notional.Setting this to true indicates that the notional is transferred at the end of the trade. This should typically be set to true in the case of an FX reset swap, or one with a varying notional.
- Parameters:
finalExchange
- the new value- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<NotionalSchedule>
-
-