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
FloatingRateName
andFloatingRateIndex
. This allows code to work with a specific index,IborIndex
,OvernightIndex
andPriceIndex
, or with the index group, represented byFloatingRateName
, usinginstanceof
All 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 Currency
getCurrency()
Gets the associated currency.FloatingRateName
getFloatingRateName()
Gets the associated floating rate name.static FloatingRate
parse(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
-
-