public void test_builder() { BondFutureOptionSecurity test = sut(); assertEquals(test.getInfo(), INFO); assertEquals(test.getSecurityId(), PRODUCT.getSecurityId()); assertEquals(test.getCurrency(), PRODUCT.getCurrency()); assertEquals(test.getUnderlyingIds(), ImmutableSet.of(PRODUCT.getUnderlyingFuture().getSecurityId())); }
@Override protected Object propertyGet(Bean bean, String propertyName, boolean quiet) { switch (propertyName.hashCode()) { case 3237038: // info return ((BondFutureOptionSecurity) bean).getInfo(); case 575402001: // currency return ((BondFutureOptionSecurity) bean).getCurrency(); case -219971059: // putCall return ((BondFutureOptionSecurity) bean).getPutCall(); case 50946231: // strikePrice return ((BondFutureOptionSecurity) bean).getStrikePrice(); case -816738431: // expiryDate return ((BondFutureOptionSecurity) bean).getExpiryDate(); case -816254304: // expiryTime return ((BondFutureOptionSecurity) bean).getExpiryTime(); case -816069761: // expiryZone return ((BondFutureOptionSecurity) bean).getExpiryZone(); case -1257652838: // premiumStyle return ((BondFutureOptionSecurity) bean).getPremiumStyle(); case -142444: // rounding return ((BondFutureOptionSecurity) bean).getRounding(); case -109104965: // underlyingFutureId return ((BondFutureOptionSecurity) bean).getUnderlyingFutureId(); } return super.propertyGet(bean, propertyName, quiet); }
/** * Restricted copy constructor. * @param beanToCopy the bean to copy from, not null */ private Builder(BondFutureOptionSecurity beanToCopy) { this.info = beanToCopy.getInfo(); this.currency = beanToCopy.getCurrency(); this.putCall = beanToCopy.getPutCall(); this.strikePrice = beanToCopy.getStrikePrice(); this.expiryDate = beanToCopy.getExpiryDate(); this.expiryTime = beanToCopy.getExpiryTime(); this.expiryZone = beanToCopy.getExpiryZone(); this.premiumStyle = beanToCopy.getPremiumStyle(); this.rounding = beanToCopy.getRounding(); this.underlyingFutureId = beanToCopy.getUnderlyingFutureId(); }