Class ResolvedSwapLeg.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedSwapLeg>
-
- com.opengamma.strata.product.swap.ResolvedSwapLeg.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<ResolvedSwapLeg>
- Enclosing class:
- ResolvedSwapLeg
public static final class ResolvedSwapLeg.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedSwapLeg>
The bean-builder forResolvedSwapLeg
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResolvedSwapLeg
build()
Object
get(String propertyName)
ResolvedSwapLeg.Builder
paymentEvents(SwapPaymentEvent... paymentEvents)
Sets thepaymentEvents
property in the builder from an array of objects.ResolvedSwapLeg.Builder
paymentEvents(List<? extends SwapPaymentEvent> paymentEvents)
Sets the payment events that are associated with the swap leg.ResolvedSwapLeg.Builder
paymentPeriods(SwapPaymentPeriod... paymentPeriods)
Sets thepaymentPeriods
property in the builder from an array of objects.ResolvedSwapLeg.Builder
paymentPeriods(List<? extends SwapPaymentPeriod> paymentPeriods)
Sets the payment periods that combine to form the swap leg.ResolvedSwapLeg.Builder
payReceive(PayReceive payReceive)
Sets whether the leg is pay or receive.ResolvedSwapLeg.Builder
set(String propertyName, Object newValue)
ResolvedSwapLeg.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
String
toString()
ResolvedSwapLeg.Builder
type(SwapLegType type)
Sets the type of the leg, such as Fixed or Ibor.
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<ResolvedSwapLeg>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedSwapLeg>
-
set
public ResolvedSwapLeg.Builder set(String propertyName, Object newValue)
-
set
public ResolvedSwapLeg.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<ResolvedSwapLeg>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedSwapLeg>
-
build
public ResolvedSwapLeg build()
-
type
public ResolvedSwapLeg.Builder type(SwapLegType type)
Sets the type of the leg, such as Fixed or Ibor.This provides a high level categorization of the swap leg.
- Parameters:
type
- the new value, not null- Returns:
- this, for chaining, not null
-
payReceive
public ResolvedSwapLeg.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.
The value of this flag should match the signs of the payment period notionals.
- Parameters:
payReceive
- the new value, not null- Returns:
- this, for chaining, not null
-
paymentPeriods
public ResolvedSwapLeg.Builder paymentPeriods(List<? extends SwapPaymentPeriod> paymentPeriods)
Sets the payment periods that combine to form the swap leg.Each payment period represents part of the life-time of the leg. In most cases, the periods do not overlap. However, since each payment period is essentially independent the data model allows overlapping periods.
The start date and end date of the leg are determined from the first and last period. As such, the periods should be sorted.
- Parameters:
paymentPeriods
- the new value, not empty- Returns:
- this, for chaining, not null
-
paymentPeriods
public ResolvedSwapLeg.Builder paymentPeriods(SwapPaymentPeriod... paymentPeriods)
Sets thepaymentPeriods
property in the builder from an array of objects.- Parameters:
paymentPeriods
- the new value, not empty- Returns:
- this, for chaining, not null
-
paymentEvents
public ResolvedSwapLeg.Builder paymentEvents(List<? extends SwapPaymentEvent> paymentEvents)
Sets the payment events that are associated with the swap leg.Payment events include notional exchange and fees.
- Parameters:
paymentEvents
- the new value, not null- Returns:
- this, for chaining, not null
-
paymentEvents
public ResolvedSwapLeg.Builder paymentEvents(SwapPaymentEvent... paymentEvents)
Sets thepaymentEvents
property in the builder from an array of objects.- Parameters:
paymentEvents
- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedSwapLeg>
-
-