/** * Pretty prints a future expiry. * * @param option the option * @return the string value * @throws IllegalArgumentException if option is null */ public static String printExpiry(Future inFuture) { Validate.notNull(inFuture, "future"); // $NON-NLS-1$ return inFuture.getExpiryAsMaturityMonthYear().getValue(); }
/* (non-Javadoc) * @see org.marketcetera.photon.core.InstrumentPrettyPrinter#doPrint(org.marketcetera.trade.Instrument) */ @Override protected String doPrint(Future inInstrument) { return String.format( "%s %s", //$NON-NLS-1$ printExpiry(inInstrument), inInstrument.getSymbol()); }