/// <summary>
 /// Creates an instance. </summary>
 /// <param name="shiftType">  the value of the property, not null </param>
 /// <param name="shiftAmount">  the value of the property, not null </param>
 /// <param name="spread">  the value of the property, not null </param>
 internal GenericDoubleShifts(ShiftType shiftType, DoubleArray shiftAmount, double spread)
 {
     JodaBeanUtils.notNull(shiftType, "shiftType");
     JodaBeanUtils.notNull(shiftAmount, "shiftAmount");
     JodaBeanUtils.notNull(spread, "spread");
     this.shiftType   = shiftType;
     this.shiftAmount = shiftAmount;
     this.spread      = spread;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates an instance. </summary>
 /// <param name="shiftType">  the value of the property, not null </param>
 /// <param name="shiftAmount">  the value of the property, not null </param>
 /// <param name="currencyPair">  the value of the property, not null </param>
 internal FxRateShifts(ShiftType shiftType, DoubleArray shiftAmount, CurrencyPair currencyPair)
 {
     JodaBeanUtils.notNull(shiftType, "shiftType");
     JodaBeanUtils.notNull(shiftAmount, "shiftAmount");
     JodaBeanUtils.notNull(currencyPair, "currencyPair");
     this.shiftType    = shiftType;
     this.shiftAmount  = shiftAmount;
     this.currencyPair = currencyPair;
 }
            public override Builder set(string propertyName, object newValue)
            {
                switch (propertyName.GetHashCode())
                {
                case 893345500:         // shiftType
                    this.shiftType = (ShiftType)newValue;
                    break;

                case -1043480710:         // shiftAmount
                    this.shiftAmount = (DoubleArray)newValue;
                    break;

                case -895684237:         // spread
                    this.spread = (double?)newValue.Value;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
Ejemplo n.º 4
0
            public override Builder set(string propertyName, object newValue)
            {
                switch (propertyName.GetHashCode())
                {
                case 893345500:         // shiftType
                    this.shiftType = (ShiftType)newValue;
                    break;

                case -1043480710:         // shiftAmount
                    this.shiftAmount = (DoubleArray)newValue;
                    break;

                case 1005147787:         // currencyPair
                    this.currencyPair = (CurrencyPair)newValue;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
 /// <summary>
 /// Creates an instance with spread.
 /// </summary>
 /// <param name="shiftType">  the shift type </param>
 /// <param name="shiftAmount">  the shift amount </param>
 /// <param name="spread">  the spread </param>
 /// <returns> the instance </returns>
 public static GenericDoubleShifts of(ShiftType shiftType, DoubleArray shiftAmount, double spread)
 {
     return(new GenericDoubleShifts(shiftType, shiftAmount, spread));
 }
Ejemplo n.º 6
0
 //-------------------------------------------------------------------------
 /// <summary>
 /// Creates an instance.
 /// </summary>
 /// <param name="shiftType">  the shift type </param>
 /// <param name="shiftAmount">  the shift amount </param>
 /// <param name="currencyPair">  the currency pair </param>
 /// <returns> the instance </returns>
 public static FxRateShifts of(ShiftType shiftType, DoubleArray shiftAmount, CurrencyPair currencyPair)
 {
     return(new FxRateShifts(shiftType, shiftAmount, currencyPair));
 }