/** * Creates a template based on this convention, specifying the period from start to end. * * <p>This returns a template based on this convention. The period from the start date to the end * date is specified. * * @param depositPeriod the period from the start date to the end date * @return the template */ public default IborFixingDepositTemplate toTemplate(Period depositPeriod) { return IborFixingDepositTemplate.of(depositPeriod, this); }
public void test_toTemplate() { IborFixingDepositConvention convention = IborFixingDepositConvention.of(GBP_LIBOR_6M); IborFixingDepositTemplate template = convention.toTemplate(); assertEquals(template.getConvention(), convention); assertEquals(template.getDepositPeriod(), GBP_LIBOR_6M.getTenor().getPeriod()); }