/** * Sets the instrument value. * * @param inInstrument an <code>Instrument</code> value or <code>null</code> * @return a <code>ImbalanceEventBuilder</code> value */ public final ImbalanceEventBuilder withInstrument(Instrument inInstrument) { imbalance.setInstrument(inInstrument); if(inInstrument instanceof Option) { option.setInstrument((Option)inInstrument); } else if(inInstrument instanceof Future) { future.setInstrument((Future)inInstrument); }else if(inInstrument instanceof Currency) { currency.setInstrument((Currency)inInstrument); } else if(inInstrument instanceof ConvertibleBond) { convertibleBond.setInstrument((ConvertibleBond)inInstrument); } if(inInstrument == null) { option.setInstrument(null); future.setInstrument(null); currency.setInstrument(null); convertibleBond.setInstrument(null); } return this; } /**
/** * Sets the instrument value. * * @param inInstrument an <code>Instrument</code> value or <code>null</code> * @return a <code>QuoteEventBuilder<E></code> value */ public QuoteEventBuilder<E> withInstrument(Instrument inInstrument) { quote.setInstrument(inInstrument); if(inInstrument instanceof Option) { option.setInstrument((Option)inInstrument); } else if(inInstrument instanceof Future) { future.setInstrument((Future)inInstrument); } else if(inInstrument instanceof Currency) { currency.setInstrument((Currency)inInstrument); } else if(inInstrument instanceof ConvertibleBond) { convertibleBond.setInstrument((ConvertibleBond)inInstrument); } if(inInstrument == null) { option.setInstrument(null); future.setInstrument(null); currency.setInstrument(null); convertibleBond.setInstrument(null); } return this; } /**
/** * Sets the instrument value. * * @param inInstrument an <code>Instrument</code> value or <code>null</code> * @return a <code>MarketstatEventBuilder</code> value */ public final MarketstatEventBuilder withInstrument(Instrument inInstrument) { marketstat.setInstrument(inInstrument); if(inInstrument instanceof Option) { option.setInstrument((Option)inInstrument); } else if(inInstrument instanceof Future) { future.setInstrument((Future)inInstrument); }else if(inInstrument instanceof Currency) { currency.setInstrument((Currency)inInstrument); } else if(inInstrument instanceof ConvertibleBond) { convertibleBond.setInstrument((ConvertibleBond)inInstrument); } if(inInstrument == null) { option.setInstrument(null); future.setInstrument(null); currency.setInstrument(null); convertibleBond.setInstrument(null); } return this; } /**
/** * Sets the instrument value. * * @param inInstrument an <code>Instrument</code> value or <code>null</code> * @return a <code>TradeEventBuilder</code> value */ public TradeEventBuilder<E> withInstrument(Instrument inInstrument) { tradeData.setInstrument(inInstrument); if(inInstrument instanceof Option) { option.setInstrument((Option)inInstrument); } else if(inInstrument instanceof Future) { future.setInstrument((Future)inInstrument); } else if(inInstrument instanceof Currency) { currency.setInstrument((Currency)inInstrument); } else if(inInstrument instanceof ConvertibleBond) { convertibleBond.setInstrument((ConvertibleBond)inInstrument); } if(inInstrument == null) { option.setInstrument(null); future.setInstrument(null); currency.setInstrument(null); convertibleBond.setInstrument(null); } return this; } /**
/** * Copies all member attributes from the donor to the recipient. * * @param inDonor an <code>FutureBean</code> value * @param inRecipient an <code>FutureBean</code> value */ protected static void copyAttributes(FutureBean inDonor, FutureBean inRecipient) { inRecipient.setDeliveryType(inDonor.getDeliveryType()); inRecipient.setInstrument(inDonor.getInstrument()); inRecipient.setProviderSymbol(inDonor.getProviderSymbol()); inRecipient.setStandardType(inDonor.getStandardType()); inRecipient.setType(inDonor.getType()); inRecipient.setUnderlyingAssetType(inDonor.getUnderlyingAssetType()); inRecipient.setContractSize(inDonor.getContractSize()); } /**
/** * Builds a <code>FutureBean</code> based on the values of * the given event. * * @param inFutureEvent a <code>FutureEvent</code> value * @return a <code>FutureBean</code> value */ public static FutureBean getFutureBeanFromEvent(FutureEvent inFutureEvent) { FutureBean future = new FutureBean(); future.setDeliveryType(inFutureEvent.getDeliveryType()); future.setType(inFutureEvent.getType()); future.setStandardType(inFutureEvent.getStandardType()); future.setUnderlyingAssetType(inFutureEvent.getUnderylingAssetType()); future.setInstrument(inFutureEvent.getInstrument()); future.setProviderSymbol(inFutureEvent.getProviderSymbol()); future.setContractSize(inFutureEvent.getContractSize()); return future; } /**