Class IborRateComputation
- java.lang.Object
-
- com.opengamma.strata.product.rate.IborRateComputation
-
- All Implemented Interfaces:
RateComputation
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class IborRateComputation extends Object implements RateComputation, org.joda.beans.ImmutableBean, Serializable
Defines the computation of a rate of interest from a single Ibor index.An interest rate determined directly from an Ibor index. For example, a rate determined from 'GBP-LIBOR-3M' on a single fixing date.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IborRateComputation.Meta
The meta-bean forIborRateComputation
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collectIndices(ImmutableSet.Builder<Index> builder)
Collects all the indices referred to by this computation.boolean
equals(Object obj)
Currency
getCurrency()
Gets the currency of the Ibor index.LocalDate
getEffectiveDate()
Gets the effective date.LocalDate
getFixingDate()
Gets the fixing date.IborIndex
getIndex()
Gets the Ibor index.LocalDate
getMaturityDate()
Gets the maturity date.IborIndexObservation
getObservation()
Gets the underlying index observation.double
getYearFraction()
Gets the year fraction.int
hashCode()
static IborRateComputation.Meta
meta()
The meta-bean forIborRateComputation
.IborRateComputation.Meta
metaBean()
static IborRateComputation
of(IborIndexObservation underlyingObservation)
Creates an instance from the underlying index observation.static IborRateComputation
of(IborIndex index, LocalDate fixingDate, ReferenceData refData)
Creates an instance from an index and fixing date.String
toString()
-
-
-
Method Detail
-
of
public static IborRateComputation of(IborIndex index, LocalDate fixingDate, ReferenceData refData)
Creates an instance from an index and fixing date.The reference data is used to find the maturity date from the fixing date.
- Parameters:
index
- the indexfixingDate
- the fixing daterefData
- the reference data to use when resolving holiday calendars- Returns:
- the rate computation
-
of
public static IborRateComputation of(IborIndexObservation underlyingObservation)
Creates an instance from the underlying index observation.- Parameters:
underlyingObservation
- the underlying index observation- Returns:
- the rate computation
-
getIndex
public IborIndex getIndex()
Gets the Ibor index.- Returns:
- the index
-
getCurrency
public Currency getCurrency()
Gets the currency of the Ibor index.- Returns:
- the currency of the index
-
getFixingDate
public LocalDate getFixingDate()
Gets the fixing date.- Returns:
- the fixing date
-
getEffectiveDate
public LocalDate getEffectiveDate()
Gets the effective date.- Returns:
- the effective date
-
getMaturityDate
public LocalDate getMaturityDate()
Gets the maturity date.- Returns:
- the maturity date
-
getYearFraction
public double getYearFraction()
Gets the year fraction.- Returns:
- the year fraction
-
collectIndices
public void collectIndices(ImmutableSet.Builder<Index> builder)
Description copied from interface:RateComputation
Collects all the indices referred to by this computation.A computation will typically refer to one index, such as 'GBP-LIBOR-3M'. Each index that is referred to must be added to the specified builder.
- Specified by:
collectIndices
in interfaceRateComputation
- Parameters:
builder
- the builder to use
-
meta
public static IborRateComputation.Meta meta()
The meta-bean forIborRateComputation
.- Returns:
- the meta-bean, not null
-
metaBean
public IborRateComputation.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getObservation
public IborIndexObservation getObservation()
Gets the underlying index observation.- Returns:
- the value of the property, not null
-
-