public enum KnockType extends Enum<KnockType> implements NamedEnum
This defines the knock type of Barrier.
| Enum Constant and Description |
|---|
KNOCK_IN
Knock-in
|
KNOCK_OUT
Knock-out
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isKnockIn()
Checks if the type is 'Knock-in'.
|
static KnockType |
of(String name)
Obtains an instance from the specified name.
|
String |
toString()
Returns the formatted name of the type.
|
static KnockType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static KnockType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final KnockType KNOCK_IN
public static final KnockType KNOCK_OUT
public static KnockType[] values()
for (KnockType c : KnockType.values()) System.out.println(c);
public static KnockType 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 KnockType 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 isKnockIn()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.