Interface FloatingRate
-
- All Superinterfaces:
Named
- All Known Subinterfaces:
FloatingRateIndex,FloatingRateName,IborIndex,OvernightIndex,PriceIndex,RateIndex
- All Known Implementing Classes:
ImmutableFloatingRateName,ImmutableIborIndex,ImmutableOvernightIndex,ImmutablePriceIndex
public interface FloatingRate extends Named
An index or group of indices used to provide floating rates, typically in interest rate swaps.This provides an abstraction above
FloatingRateNameandFloatingRateIndex. This allows code to work with a specific index,IborIndex,OvernightIndexandPriceIndex, or with the index group, represented byFloatingRateName, usinginstanceofAll implementations of this interface must be immutable and thread-safe.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description CurrencygetCurrency()Gets the associated currency.FloatingRateNamegetFloatingRateName()Gets the associated floating rate name.static FloatingRateparse(String indexStr)Parses a string, handling various different formats.static Optional<FloatingRate>tryParse(String indexStr)Parses a string, handling various different formats.
-
-
-
Method Detail
-
parse
static FloatingRate parse(String indexStr)
Parses a string, handling various different formats.This tries a number of ways to parse the input:
- Parameters:
indexStr- the index string to parse- Returns:
- the floating rate
- Throws:
IllegalArgumentException- if the name is not known
-
tryParse
static Optional<FloatingRate> tryParse(String indexStr)
Parses a string, handling various different formats.This tries a number of ways to parse the input:
- Parameters:
indexStr- the index string to parse- Returns:
- the floating rate index, empty if not found
-
getCurrency
Currency getCurrency()
Gets the associated currency.- Returns:
- the currency
-
getFloatingRateName
FloatingRateName getFloatingRateName()
Gets the associated floating rate name.- Returns:
- the floating rate name
-
-