//-------------------------------------------------------------------------
        /// <summary>
        /// Calculates the current cash of the Ibor cap/floor product.
        /// </summary>
        /// <param name="capFloor">  the Ibor cap/floor product </param>
        /// <param name="ratesProvider">  the rates provider </param>
        /// <param name="volatilities">  the volatilities </param>
        /// <returns> the current cash </returns>
        public virtual MultiCurrencyAmount currentCash(ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
        {
            CurrencyAmount ccCapFloorLeg = capFloorLegPricer.currentCash(capFloor.CapFloorLeg, ratesProvider, volatilities);

            if (!capFloor.PayLeg.Present)
            {
                return(MultiCurrencyAmount.of(ccCapFloorLeg));
            }
            CurrencyAmount ccPayLeg = payLegPricer.currentCash(capFloor.PayLeg.get(), ratesProvider);

            return(MultiCurrencyAmount.of(ccPayLeg).plus(ccCapFloorLeg));
        }