/// <summary>
 /// Restricted copy constructor. </summary>
 /// <param name="beanToCopy">  the bean to copy from, not null </param>
 internal Builder(ResolvedIborFutureOption beanToCopy)
 {
     this.securityId_Renamed       = beanToCopy.SecurityId;
     this.putCall_Renamed          = beanToCopy.PutCall;
     this.strikePrice_Renamed      = beanToCopy.StrikePrice;
     this.expiry_Renamed           = beanToCopy.Expiry;
     this.premiumStyle_Renamed     = beanToCopy.PremiumStyle;
     this.rounding_Renamed         = beanToCopy.Rounding;
     this.underlyingFuture_Renamed = beanToCopy.UnderlyingFuture;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Restricted copy constructor. </summary>
 /// <param name="beanToCopy">  the bean to copy from, not null </param>
 internal Builder(BondFutureOption beanToCopy)
 {
     this.securityId_Renamed       = beanToCopy.SecurityId;
     this.putCall_Renamed          = beanToCopy.PutCall;
     this.strikePrice_Renamed      = beanToCopy.StrikePrice;
     this.expiryDate_Renamed       = beanToCopy.ExpiryDate;
     this.expiryTime_Renamed       = beanToCopy.ExpiryTime;
     this.expiryZone_Renamed       = beanToCopy.ExpiryZone;
     this.premiumStyle_Renamed     = beanToCopy.PremiumStyle;
     this.rounding_Renamed         = beanToCopy.Rounding;
     this.underlyingFuture_Renamed = beanToCopy.UnderlyingFuture;
 }
 /// <summary>
 /// Restricted copy constructor. </summary>
 /// <param name="beanToCopy">  the bean to copy from, not null </param>
 internal Builder(IborFutureOptionSecurity beanToCopy)
 {
     this.info_Renamed               = beanToCopy.Info;
     this.currency_Renamed           = beanToCopy.Currency;
     this.putCall_Renamed            = beanToCopy.PutCall;
     this.strikePrice_Renamed        = beanToCopy.StrikePrice;
     this.expiryDate_Renamed         = beanToCopy.ExpiryDate;
     this.expiryTime_Renamed         = beanToCopy.ExpiryTime;
     this.expiryZone_Renamed         = beanToCopy.ExpiryZone;
     this.premiumStyle_Renamed       = beanToCopy.PremiumStyle;
     this.rounding_Renamed           = beanToCopy.Rounding;
     this.underlyingFutureId_Renamed = beanToCopy.UnderlyingFutureId;
 }
            public override Builder set(string propertyName, object newValue)
            {
                switch (propertyName.GetHashCode())
                {
                case 3237038:         // info
                    this.info_Renamed = (SecurityInfo)newValue;
                    break;

                case 575402001:         // currency
                    this.currency_Renamed = (Currency)newValue;
                    break;

                case -219971059:         // putCall
                    this.putCall_Renamed = (PutCall)newValue;
                    break;

                case 50946231:         // strikePrice
                    this.strikePrice_Renamed = (double?)newValue.Value;
                    break;

                case -816738431:         // expiryDate
                    this.expiryDate_Renamed = (LocalDate)newValue;
                    break;

                case -816254304:         // expiryTime
                    this.expiryTime_Renamed = (LocalTime)newValue;
                    break;

                case -816069761:         // expiryZone
                    this.expiryZone_Renamed = (ZoneId)newValue;
                    break;

                case -1257652838:         // premiumStyle
                    this.premiumStyle_Renamed = (FutureOptionPremiumStyle)newValue;
                    break;

                case -142444:         // rounding
                    this.rounding_Renamed = (Rounding)newValue;
                    break;

                case -109104965:         // underlyingFutureId
                    this.underlyingFutureId_Renamed = (SecurityId)newValue;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
 /// <summary>
 /// Creates an instance. </summary>
 /// <param name="securityId">  the value of the property, not null </param>
 /// <param name="putCall">  the value of the property </param>
 /// <param name="strikePrice">  the value of the property </param>
 /// <param name="expiry">  the value of the property, not null </param>
 /// <param name="premiumStyle">  the value of the property, not null </param>
 /// <param name="rounding">  the value of the property, not null </param>
 /// <param name="underlyingFuture">  the value of the property, not null </param>
 internal ResolvedIborFutureOption(SecurityId securityId, PutCall putCall, double strikePrice, ZonedDateTime expiry, FutureOptionPremiumStyle premiumStyle, Rounding rounding, ResolvedIborFuture underlyingFuture)
 {
     JodaBeanUtils.notNull(securityId, "securityId");
     JodaBeanUtils.notNull(expiry, "expiry");
     JodaBeanUtils.notNull(premiumStyle, "premiumStyle");
     JodaBeanUtils.notNull(rounding, "rounding");
     JodaBeanUtils.notNull(underlyingFuture, "underlyingFuture");
     this.securityId       = securityId;
     this.putCall          = putCall;
     this.strikePrice      = strikePrice;
     this.expiry           = expiry;
     this.premiumStyle     = premiumStyle;
     this.rounding         = rounding;
     this.underlyingFuture = underlyingFuture;
     validate();
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Creates an instance. </summary>
 /// <param name="securityId">  the value of the property, not null </param>
 /// <param name="putCall">  the value of the property </param>
 /// <param name="strikePrice">  the value of the property </param>
 /// <param name="expiryDate">  the value of the property, not null </param>
 /// <param name="expiryTime">  the value of the property, not null </param>
 /// <param name="expiryZone">  the value of the property, not null </param>
 /// <param name="premiumStyle">  the value of the property, not null </param>
 /// <param name="rounding">  the value of the property, not null </param>
 /// <param name="underlyingFuture">  the value of the property, not null </param>
 internal BondFutureOption(SecurityId securityId, PutCall putCall, double strikePrice, LocalDate expiryDate, LocalTime expiryTime, ZoneId expiryZone, FutureOptionPremiumStyle premiumStyle, Rounding rounding, BondFuture underlyingFuture)
 {
     JodaBeanUtils.notNull(securityId, "securityId");
     JodaBeanUtils.notNull(expiryDate, "expiryDate");
     JodaBeanUtils.notNull(expiryTime, "expiryTime");
     JodaBeanUtils.notNull(expiryZone, "expiryZone");
     JodaBeanUtils.notNull(premiumStyle, "premiumStyle");
     JodaBeanUtils.notNull(rounding, "rounding");
     JodaBeanUtils.notNull(underlyingFuture, "underlyingFuture");
     this.securityId       = securityId;
     this.putCall          = putCall;
     this.strikePrice      = strikePrice;
     this.expiryDate       = expiryDate;
     this.expiryTime       = expiryTime;
     this.expiryZone       = expiryZone;
     this.premiumStyle     = premiumStyle;
     this.rounding         = rounding;
     this.underlyingFuture = underlyingFuture;
     validate();
 }
Ejemplo n.º 7
0
 private BondFutureOptionSecurity(SecurityInfo info, Currency currency, PutCall putCall, double strikePrice, LocalDate expiryDate, LocalTime expiryTime, ZoneId expiryZone, FutureOptionPremiumStyle premiumStyle, Rounding rounding, SecurityId underlyingFutureId)
 {
     JodaBeanUtils.notNull(info, "info");
     JodaBeanUtils.notNull(currency, "currency");
     JodaBeanUtils.notNull(expiryDate, "expiryDate");
     JodaBeanUtils.notNull(expiryTime, "expiryTime");
     JodaBeanUtils.notNull(expiryZone, "expiryZone");
     JodaBeanUtils.notNull(premiumStyle, "premiumStyle");
     JodaBeanUtils.notNull(rounding, "rounding");
     JodaBeanUtils.notNull(underlyingFutureId, "underlyingFutureId");
     this.info               = info;
     this.currency           = currency;
     this.putCall            = putCall;
     this.strikePrice        = strikePrice;
     this.expiryDate         = expiryDate;
     this.expiryTime         = expiryTime;
     this.expiryZone         = expiryZone;
     this.premiumStyle       = premiumStyle;
     this.rounding           = rounding;
     this.underlyingFutureId = underlyingFutureId;
 }
            public override Builder set(string propertyName, object newValue)
            {
                switch (propertyName.GetHashCode())
                {
                case 1574023291:         // securityId
                    this.securityId_Renamed = (SecurityId)newValue;
                    break;

                case -219971059:         // putCall
                    this.putCall_Renamed = (PutCall)newValue;
                    break;

                case 50946231:         // strikePrice
                    this.strikePrice_Renamed = (double?)newValue.Value;
                    break;

                case -1289159373:         // expiry
                    this.expiry_Renamed = (ZonedDateTime)newValue;
                    break;

                case -1257652838:         // premiumStyle
                    this.premiumStyle_Renamed = (FutureOptionPremiumStyle)newValue;
                    break;

                case -142444:         // rounding
                    this.rounding_Renamed = (Rounding)newValue;
                    break;

                case -165476480:         // underlyingFuture
                    this.underlyingFuture_Renamed = (ResolvedIborFuture)newValue;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
Ejemplo n.º 9
0
 /// <summary>
 /// Sets the style of the option premium.
 /// <para>
 /// The two options are daily margining and upfront premium.
 /// </para>
 /// </summary>
 /// <param name="premiumStyle">  the new value, not null </param>
 /// <returns> this, for chaining, not null </returns>
 public Builder premiumStyle(FutureOptionPremiumStyle premiumStyle)
 {
     JodaBeanUtils.notNull(premiumStyle, "premiumStyle");
     this.premiumStyle_Renamed = premiumStyle;
     return(this);
 }