Class IborRateSensitivity
- java.lang.Object
- 
- com.opengamma.strata.pricer.rate.IborRateSensitivity
 
- 
- All Implemented Interfaces:
- FxConvertible<PointSensitivity>,- PointSensitivity,- PointSensitivityBuilder,- Serializable,- org.joda.beans.Bean,- org.joda.beans.ImmutableBean
 
 public final class IborRateSensitivity extends Object implements PointSensitivity, PointSensitivityBuilder, org.joda.beans.ImmutableBean, Serializable Point sensitivity to a rate from an Ibor index curve.Holds the sensitivity to the IborIndexcurve at a fixing date.- See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classIborRateSensitivity.MetaThe meta-bean forIborRateSensitivity.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MutablePointSensitivitiesbuildInto(MutablePointSensitivities combination)Builds the point sensitivity, adding to the specified mutable instance.IborRateSensitivitycloned()Clones the point sensitivity builder.intcompareKey(PointSensitivity other)Compares the key of two sensitivities, excluding the point sensitivity value.IborRateSensitivityconvertedTo(Currency resultCurrency, FxRateProvider rateProvider)Converts this instance to an equivalent amount in the specified currency.booleanequals(Object obj)CurrencygetCurrency()Gets the currency of the sensitivity.IborIndexgetIndex()Gets the Ibor index that the sensitivity refers to.IborIndexObservationgetObservation()Gets the Ibor index observation.doublegetSensitivity()Gets the value of the sensitivity.inthashCode()IborRateSensitivitymapSensitivity(DoubleUnaryOperator operator)Returns an instance with the specified operation applied to the sensitivities in this builder.static IborRateSensitivity.Metameta()The meta-bean forIborRateSensitivity.IborRateSensitivity.MetametaBean()IborRateSensitivitymultipliedBy(double factor)Multiplies the sensitivities in this builder by the specified factor.IborRateSensitivitynormalize()Normalizes the point sensitivities by sorting and merging.static IborRateSensitivityof(IborIndexObservation observation, double sensitivity)Obtains an instance from the observation and sensitivity value.static IborRateSensitivityof(IborIndexObservation observation, Currency sensitivityCurrency, double sensitivity)Obtains an instance from the observation and sensitivity value, specifying the currency of the value.StringtoString()IborRateSensitivitywithCurrency(Currency currency)Returns an instance with the specified sensitivity currency set.IborRateSensitivitywithSensitivity(double sensitivity)Returns an instance with the new point sensitivity value.- 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface com.opengamma.strata.market.sensitivity.PointSensitivityBuilderbuild, combinedWith
 
- 
 
- 
- 
- 
Method Detail- 
ofpublic static IborRateSensitivity of(IborIndexObservation observation, double sensitivity) Obtains an instance from the observation and sensitivity value.The currency is defaulted from the index. - Parameters:
- observation- the rate observation, including the fixing date
- sensitivity- the value of the sensitivity
- Returns:
- the point sensitivity object
 
 - 
ofpublic static IborRateSensitivity of(IborIndexObservation observation, Currency sensitivityCurrency, double sensitivity) Obtains an instance from the observation and sensitivity value, specifying the currency of the value.- Parameters:
- observation- the rate observation, including the fixing date
- sensitivityCurrency- the currency of the sensitivity
- sensitivity- the value of the sensitivity
- Returns:
- the point sensitivity object
 
 - 
getIndexpublic IborIndex getIndex() Gets the Ibor index that the sensitivity refers to.- Returns:
- the Ibor index
 
 - 
withCurrencypublic IborRateSensitivity withCurrency(Currency currency) Description copied from interface:PointSensitivityReturns an instance with the specified sensitivity currency set.The result will consists of the same points, but with the sensitivity currency altered. - Specified by:
- withCurrencyin interface- PointSensitivity
- Specified by:
- withCurrencyin interface- PointSensitivityBuilder
- Parameters:
- currency- the new currency
- Returns:
- an instance based on this sensitivity with the specified currency
 
 - 
withSensitivitypublic IborRateSensitivity withSensitivity(double sensitivity) Description copied from interface:PointSensitivityReturns an instance with the new point sensitivity value.- Specified by:
- withSensitivityin interface- PointSensitivity
- Parameters:
- sensitivity- the new sensitivity
- Returns:
- an instance based on this sensitivity with the specified sensitivity
 
 - 
compareKeypublic int compareKey(PointSensitivity other) Description copied from interface:PointSensitivityCompares the key of two sensitivities, excluding the point sensitivity value.If the other point sensitivity is of a different type, the comparison is based solely on the simple class name. If the point sensitivity is of the same type, the comparison must check the key, then the currency, then the date, then any other state. The comparison by simple class name ensures that all instances of the same type are ordered together. - Specified by:
- compareKeyin interface- PointSensitivity
- Parameters:
- other- the other sensitivity
- Returns:
- positive if greater, zero if equal, negative if less
 
 - 
convertedTopublic IborRateSensitivity convertedTo(Currency resultCurrency, FxRateProvider rateProvider) Description copied from interface:PointSensitivityConverts this instance to an equivalent amount in the specified currency.The result will be expressed in terms of the given currency. Any FX conversion that is required will use rates from the provider. - Specified by:
- convertedToin interface- FxConvertible<PointSensitivity>
- Specified by:
- convertedToin interface- PointSensitivity
- Parameters:
- resultCurrency- the currency of the result
- rateProvider- the provider of FX rates
- Returns:
- the converted instance, which should be expressed in the specified currency
 
 - 
multipliedBypublic IborRateSensitivity multipliedBy(double factor) Description copied from interface:PointSensitivityBuilderMultiplies the sensitivities in this builder by the specified factor.The result will consist of the same points, but with each sensitivity multiplied. Builders may be mutable. Once this method is called, this instance must not be used. Instead, the result of the method must be used. - Specified by:
- multipliedByin interface- PointSensitivityBuilder
- Parameters:
- factor- the multiplicative factor
- Returns:
- the resulting builder, replacing this builder
 
 - 
mapSensitivitypublic IborRateSensitivity mapSensitivity(DoubleUnaryOperator operator) Description copied from interface:PointSensitivityBuilderReturns an instance with the specified operation applied to the sensitivities in this builder.The result will consist of the same points, but with the operator applied to each sensitivity. This is used to apply a mathematical operation to the sensitivities. For example, the operator could multiply the sensitivities by a constant, or take the inverse. inverse = base.mapSensitivities(value -> 1 / value); Builders may be mutable. Once this method is called, this instance must not be used. Instead, the result of the method must be used. - Specified by:
- mapSensitivityin interface- PointSensitivityBuilder
- Parameters:
- operator- the operator to be applied to the sensitivities
- Returns:
- the resulting builder, replacing this builder
 
 - 
normalizepublic IborRateSensitivity normalize() Description copied from interface:PointSensitivityBuilderNormalizes the point sensitivities by sorting and merging.The sensitivities in the builder are sorted and then merged. Any two entries that represent the same curve query are merged. For example, if there are two point sensitivities that were created based on the same curve, currency and fixing date, then the entries are combined, summing the sensitivity value. Builders may be mutable. Once this method is called, this instance must not be used. Instead, the result of the method must be used. - Specified by:
- normalizein interface- PointSensitivityBuilder
- Returns:
- the resulting builder, replacing this builder
 
 - 
buildIntopublic MutablePointSensitivities buildInto(MutablePointSensitivities combination) Description copied from interface:PointSensitivityBuilderBuilds the point sensitivity, adding to the specified mutable instance.- Specified by:
- buildIntoin interface- PointSensitivityBuilder
- Parameters:
- combination- the combination object to add to
- Returns:
- the specified mutable point sensitivities instance is returned, for method chaining
 
 - 
clonedpublic IborRateSensitivity cloned() Description copied from interface:PointSensitivityBuilderClones the point sensitivity builder.This returns a PointSensitivityBuilderinstance that is independent from the original. Immutable implementations may return themselves.Builders may be mutable. Using this method allows a copy of the original to be obtained, so both the original and the clone can be used. - Specified by:
- clonedin interface- PointSensitivityBuilder
- Returns:
- the built combined sensitivity
 
 - 
metapublic static IborRateSensitivity.Meta meta() The meta-bean forIborRateSensitivity.- Returns:
- the meta-bean, not null
 
 - 
metaBeanpublic IborRateSensitivity.Meta metaBean() - Specified by:
- metaBeanin interface- org.joda.beans.Bean
 
 - 
getObservationpublic IborIndexObservation getObservation() Gets the Ibor index observation.This includes the index and fixing date. - Returns:
- the value of the property, not null
 
 - 
getCurrencypublic Currency getCurrency() Gets the currency of the sensitivity.- Specified by:
- getCurrencyin interface- PointSensitivity
- Returns:
- the value of the property, not null
 
 - 
getSensitivitypublic double getSensitivity() Gets the value of the sensitivity.- Specified by:
- getSensitivityin interface- PointSensitivity
- Returns:
- the value of the property
 
 
- 
 
-