Exemplo n.º 1
0
  private void setupBuildSection() {
    buildNameView.setText(BuildConfig.VERSION_NAME);
    buildCodeView.setText(String.valueOf(BuildConfig.VERSION_CODE));
    buildShaView.setText(BuildConfig.GIT_SHA);

    TemporalAccessor buildTime = ISO_INSTANT.parse(BuildConfig.BUILD_TIME);
    buildDateView.setText(DATE_DISPLAY_FORMAT.format(buildTime));
  }
 /**
  * Provides an ExternalID for Bloomberg ticker, given a reference date and an integer offset, the
  * n'th subsequent option
  *
  * <p>The format is prefix + date + callPutFlag + strike + postfix
  *
  * <p>e.g. DJX 12/21/13 C145.0 Index
  *
  * <p>
  *
  * @param futureOptionNumber n'th future following curve date, not null
  * @param strike option's strike, expressed as price in %, e.g. 98.750, not null
  * @param surfaceDate date of curve validity; valuation date, not null
  * @return the id of the Bloomberg ticker
  */
 @Override
 public ExternalId getInstrument(
     final Number futureOptionNumber, final Double strike, final LocalDate surfaceDate) {
   ArgumentChecker.notNull(futureOptionNumber, "futureOptionNumber");
   ArgumentChecker.notNull(strike, "strike");
   ArgumentChecker.notNull(surfaceDate, "surface date");
   final String prefix = getFutureOptionPrefix();
   final StringBuffer ticker = new StringBuffer();
   ticker.append(prefix);
   ticker.append(" ");
   final ExchangeTradedInstrumentExpiryCalculator expiryRule = getExpiryRuleCalculator();
   final LocalDate expiry =
       expiryRule.getExpiryDate(futureOptionNumber.intValue(), surfaceDate, NO_HOLIDAYS);
   ticker.append(FORMAT.format(expiry));
   ticker.append(" ");
   ticker.append(strike > useCallAboveStrike() ? "C" : "P");
   ticker.append(strike);
   ticker.append(" ");
   ticker.append(getPostfix());
   return ExternalId.of(getScheme(), ticker.toString());
 }
 @Override
 public Object formatCell(ZonedDateTime value, ValueSpecification valueSpec, Object inlineKey) {
   return s_formatter.format(value);
 }