Exemplo n.º 1
0
            public override Builder set(string propertyName, object newValue)
            {
                switch (propertyName.GetHashCode())
                {
                case -249814055:         // curveWithoutFixingDefinition
                    this.curveWithoutFixingDefinition = (NodalCurveDefinition)newValue;
                    break;

                case -1842439587:         // lastFixingMonth
                    this.lastFixingMonth = (YearMonth)newValue;
                    break;

                case -1834546866:         // lastFixingValue
                    this.lastFixingValue = (double?)newValue.Value;
                    break;

                case 1835044115:         // seasonalityDefinition
                    this.seasonalityDefinition = (SeasonalityDefinition)newValue;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
Exemplo n.º 2
0
        //-------------------------------------------------------------------------
        // restricted constructor
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @ImmutableConstructor InflationNodalCurveDefinition(NodalCurveDefinition curveWithoutFixing, java.time.YearMonth lastFixingMonth, double lastFixingValue, SeasonalityDefinition seasonalityDefinition)
        internal InflationNodalCurveDefinition(NodalCurveDefinition curveWithoutFixing, YearMonth lastFixingMonth, double lastFixingValue, SeasonalityDefinition seasonalityDefinition)
        {
            this.curveWithoutFixingDefinition = curveWithoutFixing;
            this.lastFixingMonth = lastFixingMonth;
            this.lastFixingValue = lastFixingValue;
            if (seasonalityDefinition == null)
            {
                this.seasonalityDefinition = NO_SEASONALITY_DEFINITION;
            }
            else
            {
                this.seasonalityDefinition = seasonalityDefinition;
            }
        }