public final class FixedRateStubCalculation extends Object implements org.joda.beans.ImmutableBean, Serializable
A standard swap leg consists of a regular periodic schedule and one or two stub periods at each end. This class defines what fixed rate to use during a stub.
The calculation may be specified in two ways.
| Modifier and Type | Class and Description |
|---|---|
static class |
FixedRateStubCalculation.Meta
The meta-bean for
FixedRateStubCalculation. |
| Modifier and Type | Field and Description |
|---|---|
static FixedRateStubCalculation |
NONE
An instance that has no special rate handling.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
OptionalDouble |
getFixedRate()
Gets the fixed rate to use in the stub.
|
Optional<CurrencyAmount> |
getKnownAmount()
Gets the known amount to pay/receive for the stub.
|
int |
hashCode() |
boolean |
isFixedRate()
Checks if the stub has a fixed rate.
|
boolean |
isKnownAmount()
Checks if the stub has a known amount.
|
static FixedRateStubCalculation.Meta |
meta()
The meta-bean for
FixedRateStubCalculation. |
FixedRateStubCalculation.Meta |
metaBean() |
static FixedRateStubCalculation |
ofFixedRate(double fixedRate)
Obtains an instance with a single fixed rate.
|
static FixedRateStubCalculation |
ofKnownAmount(CurrencyAmount knownAmount)
Obtains an instance with a known amount of interest.
|
String |
toString() |
public static final FixedRateStubCalculation NONE
public static FixedRateStubCalculation ofFixedRate(double fixedRate)
fixedRate - the fixed rate for the stubpublic static FixedRateStubCalculation ofKnownAmount(CurrencyAmount knownAmount)
knownAmount - the known amount of interestpublic boolean isFixedRate()
public boolean isKnownAmount()
public static FixedRateStubCalculation.Meta meta()
FixedRateStubCalculation.public FixedRateStubCalculation.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic OptionalDouble getFixedRate()
If the fixed rate is present, then knownAmount must not be present.
public Optional<CurrencyAmount> getKnownAmount()
If the known amount is present, then fixedRate must not be present.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.