Class NotionalExchange
- java.lang.Object
-
- com.opengamma.strata.product.swap.NotionalExchange
-
- All Implemented Interfaces:
SwapPaymentEvent
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class NotionalExchange extends Object implements SwapPaymentEvent, org.joda.beans.ImmutableBean, Serializable
An exchange of notionals between two counterparties.In most swaps, the notional amount is not exchanged, with only the net difference being exchanged. However, in certain cases, initial, final or intermediate amounts are exchanged. In this case, the notional can be referred to as the principal.
This class represents a notional exchange where the amount is known in advance.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NotionalExchange.Meta
The meta-bean forNotionalExchange
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NotionalExchange
adjustPaymentDate(TemporalAdjuster adjuster)
Adjusts the payment date using the rules of the specified adjuster.boolean
equals(Object obj)
Currency
getCurrency()
Gets the currency of the event.Payment
getPayment()
Gets the notional exchange payment.CurrencyAmount
getPaymentAmount()
Gets the payment amount.LocalDate
getPaymentDate()
Gets the date that the payment is made.int
hashCode()
boolean
isKnownAmountAt(LocalDate date)
Checks whether the payment amount of an event is known at a given date.static NotionalExchange.Meta
meta()
The meta-bean forNotionalExchange
.NotionalExchange.Meta
metaBean()
static NotionalExchange
of(CurrencyAmount paymentAmount, LocalDate paymentDate)
Obtains an instance from the amount and date.static NotionalExchange
of(Payment payment)
Obtains an instance from the payment.String
toString()
-
-
-
Method Detail
-
of
public static NotionalExchange of(CurrencyAmount paymentAmount, LocalDate paymentDate)
Obtains an instance from the amount and date.- Parameters:
paymentAmount
- the amount of the notional exchangepaymentDate
- the date that the payment is made- Returns:
- the notional exchange
-
of
public static NotionalExchange of(Payment payment)
Obtains an instance from the payment.- Parameters:
payment
- the payment to be made- Returns:
- the notional exchange
-
getPaymentDate
public LocalDate getPaymentDate()
Description copied from interface:SwapPaymentEvent
Gets the date that the payment is made.Each payment event has a single payment date. This date has been adjusted to be a valid business day.
- Specified by:
getPaymentDate
in interfaceSwapPaymentEvent
- Returns:
- the payment date
-
getPaymentAmount
public CurrencyAmount getPaymentAmount()
Gets the payment amount.- Returns:
- the payment amount
-
getCurrency
public Currency getCurrency()
Gets the currency of the event.The currency of the event is the currency of the payment.
- Specified by:
getCurrency
in interfaceSwapPaymentEvent
- Returns:
- the currency of the event
-
adjustPaymentDate
public NotionalExchange adjustPaymentDate(TemporalAdjuster adjuster)
Description copied from interface:SwapPaymentEvent
Adjusts the payment date using the rules of the specified adjuster.The adjuster is typically an instance of
BusinessDayAdjustment
. Implementations must return a new instance unless they are immutable and no change occurs.- Specified by:
adjustPaymentDate
in interfaceSwapPaymentEvent
- Parameters:
adjuster
- the adjuster to apply to the payment date- Returns:
- the adjusted payment event
-
isKnownAmountAt
public boolean isKnownAmountAt(LocalDate date)
Description copied from interface:SwapPaymentEvent
Checks whether the payment amount of an event is known at a given date.Each payment event may be a known amount at a given date, else it could be fixed at a later date
- Specified by:
isKnownAmountAt
in interfaceSwapPaymentEvent
- Parameters:
date
- the date to check whether payment amount is known or not- Returns:
- true if payment is fixed at given date
-
meta
public static NotionalExchange.Meta meta()
The meta-bean forNotionalExchange
.- Returns:
- the meta-bean, not null
-
metaBean
public NotionalExchange.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getPayment
public Payment getPayment()
Gets the notional exchange payment.This contains the amount to be paid and the date that payment occurs. This date has been adjusted to be a valid business day.
- Returns:
- the value of the property, not null
-
-