public enum CapFloor extends Enum<CapFloor> implements NamedEnum
Specifies whether the financial instrument is cap or a floor. For example, in an interest rate cap the buyer receives payments at the end of each period in which the interest rate exceeds the agreed strike price.
| Modifier and Type | Method and Description |
|---|---|
boolean |
isCap()
Checks if the type is 'Cap'.
|
boolean |
isFloor()
Checks if the type is 'Floor'.
|
static CapFloor |
of(String name)
Obtains an instance from the specified name.
|
CapFloor |
opposite()
Supplies the opposite of this value.
|
String |
toString()
Returns the formatted name of the type.
|
static CapFloor |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CapFloor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CapFloor CAP
public static final CapFloor FLOOR
public static CapFloor[] values()
for (CapFloor c : CapFloor.values()) System.out.println(c);
public static CapFloor 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 CapFloor 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 isCap()
public boolean isFloor()
public CapFloor opposite()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.