public enum SwapLegType extends Enum<SwapLegType> implements NamedEnum
This provides a high-level categorization of a swap leg. This is useful when it is necessary to find a specific leg.
| Enum Constant and Description |
|---|
FIXED
A fixed rate swap leg.
|
IBOR
A floating rate swap leg based on an Ibor index.
|
INFLATION
A floating rate swap leg based on an price index.
|
OTHER
A swap leg that is not based on a Fixed, Ibor, Overnight or Inflation rate.
|
OVERNIGHT
A floating rate swap leg based on an Overnight index.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isFixed()
Checks if the type is 'Fixed'.
|
boolean |
isFloat()
Checks if the type is floating, defined as 'Ibor', 'Overnight' or 'Inflation'.
|
static SwapLegType |
of(String name)
Obtains an instance from the specified name.
|
String |
toString()
Returns the formatted name of the type.
|
static SwapLegType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SwapLegType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SwapLegType FIXED
public static final SwapLegType IBOR
This kind of leg may include some fixed periods, such as in a stub or where the first rate is specified in the contract.
public static final SwapLegType OVERNIGHT
This kind of leg may include some fixed periods, such as in a stub or where the first rate is specified in the contract.
public static final SwapLegType INFLATION
This kind of leg may include some reference dates where the index rate is specified.
public static final SwapLegType OTHER
public static SwapLegType[] values()
for (SwapLegType c : SwapLegType.values()) System.out.println(c);
public static SwapLegType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static SwapLegType of(String name)
Parsing handles the mixed case form produced by toString() and
the upper and lower case variants of the enum constant name.
name - the name to parseIllegalArgumentException - if the name is not knownpublic boolean isFixed()
public boolean isFloat()
public String toString()
toString in class Enum<SwapLegType>Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.