## Class KnownAmountSwapLeg.Builder

• All Implemented Interfaces:
BeanBuilder<KnownAmountSwapLeg>
Enclosing class:
KnownAmountSwapLeg

public static final class KnownAmountSwapLeg.Builder
extends DirectFieldsBeanBuilder<KnownAmountSwapLeg>
The bean-builder for KnownAmountSwapLeg.
• ### Method Summary

All Methods
Modifier and Type Method Description
KnownAmountSwapLeg.Builder accrualSchedule​(PeriodicSchedule accrualSchedule)
Sets the accrual period schedule.
KnownAmountSwapLeg.Builder amount​(ValueSchedule amount)
Sets the known amount schedule.
KnownAmountSwapLeg build()
KnownAmountSwapLeg.Builder currency​(Currency currency)
Sets the currency of the swap leg.
java.lang.Object get​(java.lang.String propertyName)
KnownAmountSwapLeg.Builder paymentSchedule​(PaymentSchedule paymentSchedule)
Sets the payment period schedule.
KnownAmountSwapLeg.Builder payReceive​(PayReceive payReceive)
Sets whether the leg is pay or receive.
KnownAmountSwapLeg.Builder set​(java.lang.String propertyName, java.lang.Object newValue)
KnownAmountSwapLeg.Builder set​(MetaProperty<?> property, java.lang.Object value)
java.lang.String toString()
• ### Methods inherited from class org.joda.beans.impl.direct.DirectFieldsBeanBuilder

get
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
• ### Method Detail

• #### get

public java.lang.Object get​(java.lang.String propertyName)
Specified by:
get in interface BeanBuilder<KnownAmountSwapLeg>
Overrides:
get in class DirectFieldsBeanBuilder<KnownAmountSwapLeg>
• #### set

public KnownAmountSwapLeg.Builder set​(java.lang.String propertyName,
java.lang.Object newValue)
• #### set

public KnownAmountSwapLeg.Builder set​(MetaProperty<?> property,
java.lang.Object value)
Specified by:
set in interface BeanBuilder<KnownAmountSwapLeg>
Overrides:
set in class DirectFieldsBeanBuilder<KnownAmountSwapLeg>
• #### build

public KnownAmountSwapLeg build()

public KnownAmountSwapLeg.Builder payReceive​(PayReceive payReceive)
Sets whether the leg is pay or receive.

A value of 'Pay' implies that the resulting amount is paid to the counterparty. A value of 'Receive' implies that the resulting amount is received from the counterparty. Note that negative interest rates can result in a payment in the opposite direction to that implied by this indicator.

Parameters:
payReceive - the new value, not null
Returns:
this, for chaining, not null
• #### accrualSchedule

public KnownAmountSwapLeg.Builder accrualSchedule​(PeriodicSchedule accrualSchedule)
Sets the accrual period schedule.

This is used to define the accrual periods. These are used directly or indirectly to determine other dates in the swap.

Parameters:
accrualSchedule - the new value, not null
Returns:
this, for chaining, not null
• #### paymentSchedule

public KnownAmountSwapLeg.Builder paymentSchedule​(PaymentSchedule paymentSchedule)
Sets the payment period schedule.

This is used to define the payment periods, including any compounding. The payment period dates are based on the accrual schedule.

Parameters:
paymentSchedule - the new value, not null
Returns:
this, for chaining, not null
• #### amount

public KnownAmountSwapLeg.Builder amount​(ValueSchedule amount)
Sets the known amount schedule.

This defines the schedule of known amounts, relative to the payment schedule. The schedule is defined as an initial amount, with optional changes during the tenor of the swap. The amount is only permitted to change at payment period boundaries.

Note that the date of the payment is implied by the payment schedule. Any dates in the known amount schedule refer to the payment schedule, not the payment date.

For example, consider a two year swap where each payment period is 3 months long. This schedule could define two entries, one that defines the payment amounts as GBP 1000 for the first year and one that defines the amount as GBP 500 for the second year. In this case there will be eight payments in total, four payments of GBP 1000 in the first year and four payments of GBP 500 in the second year. Each payment will occur on the date specified using the offset in PaymentSchedule.

Parameters:
amount - the new value, not null
Returns:
this, for chaining, not null
• #### currency

public KnownAmountSwapLeg.Builder currency​(Currency currency)
Sets the currency of the swap leg.

This is the currency of the known payments.

Parameters:
currency - the new value, not null
Returns:
this, for chaining, not null
• #### toString

public java.lang.String toString()
Overrides:
toString in class DirectFieldsBeanBuilder<KnownAmountSwapLeg>