Interface PointSensitivity

    • Method Detail

      • getCurrency

        Currency getCurrency()
        Gets the currency of the point sensitivity.
        the currency
      • getSensitivity

        double getSensitivity()
        Gets the point sensitivity value.
        the sensitivity
      • withCurrency

        PointSensitivity withCurrency​(Currency currency)
        Returns an instance with the specified sensitivity currency set.

        The result will consists of the same points, but with the sensitivity currency altered.

        currency - the new currency
        an instance based on this sensitivity with the specified currency
      • withSensitivity

        PointSensitivity withSensitivity​(double sensitivity)
        Returns an instance with the new point sensitivity value.
        sensitivity - the new sensitivity
        an instance based on this sensitivity with the specified sensitivity
      • compareKey

        int compareKey​(PointSensitivity other)
        Compares 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.

        other - the other sensitivity
        positive if greater, zero if equal, negative if less
      • convertedTo

        default PointSensitivity convertedTo​(Currency resultCurrency,
                                             FxRateProvider rateProvider)
        Converts 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:
        convertedTo in interface FxConvertible<PointSensitivity>
        resultCurrency - the currency of the result
        rateProvider - the provider of FX rates
        the converted instance, which should be expressed in the specified currency
        java.lang.RuntimeException - if no FX rate could be found