@Override public TenorAdjustment build() { return new TenorAdjustment( tenor, additionConvention, adjustment); }
/** * Obtains an instance that can adjust a date by the specified tenor. * <p> * When adjusting a date, the specified tenor is added to the input date. * The business day adjustment will then be used to ensure the result is a valid business day. * * @param tenor the tenor to add to the input date * @param additionConvention the convention used to perform the addition * @param adjustment the business day adjustment to apply to the result of the addition * @return the tenor adjustment */ public static TenorAdjustment of( Tenor tenor, PeriodAdditionConvention additionConvention, BusinessDayAdjustment adjustment) { return new TenorAdjustment(tenor, additionConvention, adjustment); }
/** * Obtains an instance that can adjust a date by the specified tenor using the * last day of month convention. * <p> * When adjusting a date, the specified tenor is added to the input date. * The business day adjustment will then be used to ensure the result is a valid business day. * <p> * The period must consist only of months and/or years. * * @param tenor the tenor to add to the input date * @param adjustment the business day adjustment to apply to the result of the addition * @return the tenor adjustment */ public static TenorAdjustment ofLastDay(Tenor tenor, BusinessDayAdjustment adjustment) { return new TenorAdjustment(tenor, PeriodAdditionConventions.LAST_DAY, adjustment); }
/** * Obtains an instance that can adjust a date by the specified tenor using the * last business day of month convention. * <p> * When adjusting a date, the specified tenor is added to the input date. * The business day adjustment will then be used to ensure the result is a valid business day. * <p> * The period must consist only of months and/or years. * * @param tenor the tenor to add to the input date * @param adjustment the business day adjustment to apply to the result of the addition * @return the tenor adjustment */ public static TenorAdjustment ofLastBusinessDay(Tenor tenor, BusinessDayAdjustment adjustment) { return new TenorAdjustment(tenor, PeriodAdditionConventions.LAST_BUSINESS_DAY, adjustment); }