class Tenor implements Comparable<Tenor>, Serializable {

  @FromString
  @SuppressWarnings("deprecation")
  public static Tenor parse(final String tenorStr) {
    ArgumentChecker.notNull(tenorStr, "tenorStr");
    try {
      return new Tenor(DateUtils.toPeriod(tenorStr));
    } catch (DateTimeParseException e) {
      return new Tenor(BusinessDayTenor.valueOf(tenorStr));
    }
  }

  @Deprecated public  Tenor(final Period period);
  private  Tenor(final BusinessDayTenor businessDayTenor);

}