using System;

namespace Volpe.Cafe.EffectsData.Collections
{
    /// <summary>
    /// Provides a collection of owner and societal costs arising from the various modeling effects, separated by
    /// regulatory class and fuel type.
    /// </summary>
    /// <inheritdoc cref="ModelingEffectsCollection{T}" path="/remarks"/>
    [Serializable]
    public sealed class SocietalCostsCollection : ModelingEffectsCollection<SocietalCosts>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="SocietalCostsCollection"/> class.
        /// </summary>
        /// <param name="discRate">
        ///     The discount rate at which the owner and societal costs are discounted, or 0, if the costs are
        ///     undiscounted.
        /// </param>
        public SocietalCostsCollection(double discRate) : base()
        {
            this.DiscountRate = discRate;
        }

        /// <summary>
        /// Gets the discount rate at which the owner and societal costs are discounted, or 0, if the costs are
        /// undiscounted.
        /// </summary>
        public double DiscountRate { get; }

        /// <summary>
        /// Resets all owner and societal costs to zero.<br/>
        /// <b>NOTE</b>: The discount rate is not affected.
        /// </summary>
        public new void Clear()
        {
            base.Clear();
        }

        /// <summary>
        /// Appends all values from the specified <see cref="SocietalCostsCollection"/> object to this instance.<br/>
        /// <b>NOTE</b>: The discount rate is not appended.
        /// </summary>
        public void Append(SocietalCostsCollection value)
        {
            base.Append(value);
        }

    }
}
