@Override public SwaptionTrade build() { return new SwaptionTrade( info, product, premium); }
/** * Returns a builder that allows this bean to be mutated. * @return the mutable builder, not null */ public Builder toBuilder() { return new Builder(this); }
/** * Returns a builder used to create an instance of the bean. * @return the builder, not null */ public static ResolvedSwaptionTrade.Builder builder() { return new ResolvedSwaptionTrade.Builder(); }
static Swaption sut() { return Swaption.builder() .expiryDate(ADJUSTABLE_EXPIRY_DATE) .expiryTime(EXPIRY_TIME) .expiryZone(ZONE) .longShort(LONG) .swaptionSettlement(PHYSICAL_SETTLE) .underlying(SWAP) .build(); }
/** * Restricted copy constructor. * @param beanToCopy the bean to copy from, not null */ private Builder(Swaption beanToCopy) { this.longShort = beanToCopy.getLongShort(); this.swaptionSettlement = beanToCopy.getSwaptionSettlement(); this.expiryDate = beanToCopy.getExpiryDate(); this.expiryTime = beanToCopy.getExpiryTime(); this.expiryZone = beanToCopy.getExpiryZone(); this.underlying = beanToCopy.getUnderlying(); }
static ResolvedSwaption sut() { return ResolvedSwaption.builder() .expiry(EXPIRY) .longShort(LONG) .swaptionSettlement(PHYSICAL_SETTLE) .underlying(SWAP) .build(); }
/** * Restricted copy constructor. * @param beanToCopy the bean to copy from, not null */ private Builder(SwaptionTrade beanToCopy) { this.info = beanToCopy.getInfo(); this.product = beanToCopy.getProduct(); this.premium = beanToCopy.getPremium(); }
@Override public ResolvedSwaptionTrade build() { return new ResolvedSwaptionTrade( info, product, premium); }
/** * Obtains an instance from the settlement date and method. * * @param settlementDate the settlement date * @param method the settlement method * @return the settlement */ public static CashSwaptionSettlement of(LocalDate settlementDate, CashSwaptionSettlementMethod method) { return new CashSwaptionSettlement(settlementDate, method); }
/** * Returns a builder used to create an instance of the bean. * @return the builder, not null */ public static ResolvedSwaption.Builder builder() { return new ResolvedSwaption.Builder(); }
/** * Returns a builder used to create an instance of the bean. * @return the builder, not null */ public static SwaptionTrade.Builder builder() { return new SwaptionTrade.Builder(); }
/** * Obtains an instance of a Swaption trade with an adjustable payment. * * @param info the trade info * @param product the product * @param premium the premium * @return the trade */ public static SwaptionTrade of(TradeInfo info, Swaption product, AdjustablePayment premium) { return new SwaptionTrade(info, product, premium); }
/** * Returns a builder used to create an instance of the bean. * @return the builder, not null */ public static Swaption.Builder builder() { return new Swaption.Builder(); }
/** * Returns a builder that allows this bean to be mutated. * @return the mutable builder, not null */ public Builder toBuilder() { return new Builder(this); }
/** * Obtains an instance of a resolved Swaption trade. * * @param info the trade info * @param product the product * @param premium the premium * @return the resolved trade */ public static ResolvedSwaptionTrade of(TradeInfo info, ResolvedSwaption product, Payment premium) { return new ResolvedSwaptionTrade(info, product, premium); }
@Override public CashSwaptionSettlement build() { return new CashSwaptionSettlement( settlementDate, method); }