@Override public ZeroRateSensitivity build() { return new ZeroRateSensitivity( curveCurrency, yearFraction, currency, sensitivity); }
@Override public ZeroRateSensitivity multipliedBy(double factor) { return new ZeroRateSensitivity(curveCurrency, yearFraction, currency, sensitivity * factor); }
@Override public ZeroRateSensitivity withSensitivity(double sensitivity) { return new ZeroRateSensitivity(curveCurrency, yearFraction, currency, sensitivity); }
/** * Obtains an instance from the curve currency, date and value. * <p> * The currency representing the curve is used also for the sensitivity currency. * * @param currency the currency of the curve and sensitivity * @param yearFraction the year fraction that was looked up on the curve * @param sensitivity the value of the sensitivity * @return the point sensitivity object */ public static ZeroRateSensitivity of(Currency currency, double yearFraction, double sensitivity) { return new ZeroRateSensitivity(currency, yearFraction, currency, sensitivity); }
/** * Obtains an instance from the curve currency, date, sensitivity currency and value. * <p> * The currency representing the curve is used also for the sensitivity currency. * * @param curveCurrency the currency of the curve * @param yearFraction the year fraction that was looked up on the curve * @param sensitivityCurrency the currency of the sensitivity * @param sensitivity the value of the sensitivity * @return the point sensitivity object */ public static ZeroRateSensitivity of( Currency curveCurrency, double yearFraction, Currency sensitivityCurrency, double sensitivity) { return new ZeroRateSensitivity(curveCurrency, yearFraction, sensitivityCurrency, sensitivity); }
@Override public ZeroRateSensitivity withCurrency(Currency currency) { if (this.currency.equals(currency)) { return this; } return new ZeroRateSensitivity(curveCurrency, yearFraction, currency, sensitivity); }
@Override public ZeroRateSensitivity mapSensitivity(DoubleUnaryOperator operator) { return new ZeroRateSensitivity(curveCurrency, yearFraction, currency, operator.applyAsDouble(sensitivity)); }