Enum FloatingRateType
- java.lang.Object
-
- java.lang.Enum<FloatingRateType>
-
- com.opengamma.strata.basics.index.FloatingRateType
-
- All Implemented Interfaces:
Named
,NamedEnum
,Serializable
,Comparable<FloatingRateType>
public enum FloatingRateType extends Enum<FloatingRateType> implements NamedEnum
The type of a floating rate index.This provides a high-level categorization of the floating rate index. This is used to classify the index and create the right kind of pricing index,
IborIndex
orOvernightIndex
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description IBOR
A floating rate index that is based on an Ibor index.OTHER
A floating rate index of another type.OVERNIGHT_AVERAGED
A floating rate index that is based on an Overnight index with averaging.OVERNIGHT_COMPOUNDED
A floating rate index that is based on an Overnight index with compounding.PRICE
A floating rate index that is based on a price index.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isIbor()
Checks if the type is 'Ibor'.boolean
isOvernight()
Checks if the type is 'OvernightCompounded' or 'OvernightAveraged'.boolean
isPrice()
Checks if the type is 'Price'.static FloatingRateType
of(String name)
Obtains an instance from the specified name.String
toString()
Returns the formatted name of the type.static FloatingRateType
valueOf(String name)
Returns the enum constant of this type with the specified name.static FloatingRateType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
IBOR
public static final FloatingRateType IBOR
A floating rate index that is based on an Ibor index.This kind of rate translates to an
IborIndex
.
-
OVERNIGHT_COMPOUNDED
public static final FloatingRateType OVERNIGHT_COMPOUNDED
A floating rate index that is based on an Overnight index with compounding.This kind of rate translates to an
OvernightIndex
.
-
OVERNIGHT_AVERAGED
public static final FloatingRateType OVERNIGHT_AVERAGED
A floating rate index that is based on an Overnight index with averaging.This kind of rate translates to an
OvernightIndex
. This is typically used only for US Fed Fund swaps.
-
PRICE
public static final FloatingRateType PRICE
A floating rate index that is based on a price index.This kind of rate translates to an
PriceIndex
.
-
OTHER
public static final FloatingRateType OTHER
A floating rate index of another type.
-
-
Method Detail
-
values
public static FloatingRateType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (FloatingRateType c : FloatingRateType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FloatingRateType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
of
public static FloatingRateType of(String name)
Obtains an instance from the specified name.Parsing handles the mixed case form produced by
toString()
and the upper and lower case variants of the enum constant name.- Parameters:
name
- the name to parse- Returns:
- the type
- Throws:
IllegalArgumentException
- if the name is not known
-
isIbor
public boolean isIbor()
Checks if the type is 'Ibor'.- Returns:
- true if Ibor, false otherwise
-
isOvernight
public boolean isOvernight()
Checks if the type is 'OvernightCompounded' or 'OvernightAveraged'.- Returns:
- true if Overnight, false otherwise
-
isPrice
public boolean isPrice()
Checks if the type is 'Price'.- Returns:
- true if Price, false otherwise
-
toString
public String toString()
Returns the formatted name of the type.- Overrides:
toString
in classEnum<FloatingRateType>
- Returns:
- the formatted string representing the type
-
-