class ExternalSchemes {

  public static ExternalId bloombergTCMSecurityId(final String tickerWithoutSector, final String coupon, final String maturity, final String marketSector) {
    ArgumentChecker.notNull(tickerWithoutSector, "tickerWithoutSector");
    ArgumentChecker.notNull(coupon, "coupon");
    ArgumentChecker.notNull(maturity, "maturity");
    ArgumentChecker.notNull(marketSector, "marketSector");
    if (StringUtils.isEmpty(tickerWithoutSector)) {
      throw new IllegalArgumentException("Ticker (without sector) must not be empty");
    }
    if (StringUtils.isEmpty(coupon)) {
      throw new IllegalArgumentException("Coupon must not be empty, ticker = " + tickerWithoutSector);
    }
    if (StringUtils.isEmpty(maturity)) {
      throw new IllegalArgumentException("Maturity must not be empty, ticker = " + tickerWithoutSector + ", coupon = " + coupon);
    }
    if (StringUtils.isEmpty(marketSector)) {
      throw new IllegalArgumentException("Market sector must not be empty, ticker = " + tickerWithoutSector + ", coupon = " + coupon + ", maturity = " + maturity);
    }
    Double couponDbl;
    try {
      couponDbl = Double.parseDouble(coupon);
    } catch (final NumberFormatException ex) {
      throw new IllegalArgumentException("Coupon must be a valid double, ticker=" + tickerWithoutSector + ", coupon=" + coupon, ex);
    }
    if (s_logger.isDebugEnabled()) {
      try {
        LocalDate.parse(maturity, DateTimeFormatter.ofPattern("MM/dd/yy"));
      } catch (final UnsupportedOperationException uoe) {
        s_logger.warn("Problem parsing maturity " + maturity + " ticker=" + tickerWithoutSector + ", coupon=" + coupon);
      } catch (final DateTimeException ex) {
        s_logger.warn("Problem parsing maturity " + maturity + " ticker=" + tickerWithoutSector + ", coupon=" + coupon);
      }
    }
    return ExternalId.of(BLOOMBERG_TCM, tickerWithoutSector + " " + couponDbl + " " + maturity + " " + marketSector);
  }

  protected  ExternalSchemes();

}