//-------------------------------------------------------------------------
        /// <summary>
        /// Calculates the present value sensitivity to the strike value.
        /// <para>
        /// The present value sensitivity of the leg is the sensitivity of the present value to the strike value.
        /// This is not relevant for CMS coupons and an exception is thrown in the underlying pricer.
        ///
        /// </para>
        /// </summary>
        /// <param name="cmsLeg">  the CMS leg </param>
        /// <param name="ratesProvider">  the rates provider </param>
        /// <param name="swaptionVolatilities">  the swaption volatilities </param>
        /// <returns> the present value sensitivity </returns>
        public virtual double presentValueSensitivityStrike(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
        {
            validate(ratesProvider, swaptionVolatilities);
//JAVA TO C# CONVERTER TODO TASK: Most Java stream collectors are not converted by Java to C# Converter:
            return(cmsLeg.CmsPeriods.Select(cmsPeriod => cmsPeriodPricer.presentValueSensitivityStrike(cmsPeriod, ratesProvider, swaptionVolatilities)).collect(Collectors.summingDouble(double?.doubleValue)));
        }