@Override public TermDepositTemplate build() { return new TermDepositTemplate( depositPeriod, convention); }
@Override public ImmutableTermDepositConvention build() { return new ImmutableTermDepositConvention( currency, name, businessDayAdjustment, dayCount, spotDateOffset); }
/** * Obtains a template based on the specified period and index. * <p> * The period from the start date to the end is specified. * The convention will be created based on the index. * * @param depositPeriod the period between the start date and the end date * @param index the index that defines the market convention * @return the template */ public static IborFixingDepositTemplate of(Period depositPeriod, IborIndex index) { return of(depositPeriod, IborFixingDepositConvention.of(index)); }
/** * Restricted copy constructor. * @param beanToCopy the bean to copy from, not null */ private Builder(ImmutableTermDepositConvention beanToCopy) { this.currency = beanToCopy.getCurrency(); this.name = beanToCopy.getName(); this.businessDayAdjustment = beanToCopy.getBusinessDayAdjustment(); this.dayCount = beanToCopy.getDayCount(); this.spotDateOffset = beanToCopy.getSpotDateOffset(); }
public void test_builder() { TermDepositTemplate test = TermDepositTemplate.builder() .convention(CONVENTION) .depositPeriod(DEPOSIT_PERIOD) .build(); assertEquals(test.getConvention(), CONVENTION); assertEquals(test.getDepositPeriod(), DEPOSIT_PERIOD); }
/** * Restricted copy constructor. * @param beanToCopy the bean to copy from, not null */ private Builder(IborFixingDepositTemplate beanToCopy) { this.depositPeriod = beanToCopy.getDepositPeriod(); this.convention = beanToCopy.getConvention(); }
/** * Restricted copy constructor. * @param beanToCopy the bean to copy from, not null */ private Builder(TermDepositTemplate beanToCopy) { this.depositPeriod = beanToCopy.getDepositPeriod(); this.convention = beanToCopy.getConvention(); }
public void coverage() { ImmutableIborFixingDepositConvention test1 = ImmutableIborFixingDepositConvention.of(GBP_LIBOR_6M); coverImmutableBean(test1); ImmutableIborFixingDepositConvention test2 = ImmutableIborFixingDepositConvention.of(EUR_LIBOR_3M) .toBuilder() .name("Foo") .build(); coverBeanEquals(test1, test2); coverPrivateConstructor(IborFixingDepositConventions.class); coverPrivateConstructor(IborFixingDepositConventionLookup.class); }
/** * Restricted copy constructor. * @param beanToCopy the bean to copy from, not null */ private Builder(ImmutableIborFixingDepositConvention beanToCopy) { this.index = beanToCopy.getIndex(); this.name = beanToCopy.name; this.currency = beanToCopy.currency; this.dayCount = beanToCopy.dayCount; this.spotDateOffset = beanToCopy.spotDateOffset; this.businessDayAdjustment = beanToCopy.businessDayAdjustment; this.fixingDateOffset = beanToCopy.fixingDateOffset; }
/** * Returns a builder used to create an instance of the bean. * @return the builder, not null */ public static ImmutableIborFixingDepositConvention.Builder builder() { return new ImmutableIborFixingDepositConvention.Builder(); }
/** * Returns a builder used to create an instance of the bean. * @return the builder, not null */ public static IborFixingDepositTemplate.Builder builder() { return new IborFixingDepositTemplate.Builder(); }
/** * Returns a builder used to create an instance of the bean. * @return the builder, not null */ public static ImmutableTermDepositConvention.Builder builder() { return new ImmutableTermDepositConvention.Builder(); }
/** * Returns a builder that allows this bean to be mutated. * @return the mutable builder, not null */ public Builder toBuilder() { return new Builder(this); }
@Override public ImmutableIborFixingDepositConvention build() { return new ImmutableIborFixingDepositConvention( index, name, currency, dayCount, spotDateOffset, businessDayAdjustment, fixingDateOffset); }
@Override public IborFixingDepositTemplate build() { preBuild(this); return new IborFixingDepositTemplate( depositPeriod, convention); }
/** * Returns a builder that allows this bean to be mutated. * @return the mutable builder, not null */ public Builder toBuilder() { return new Builder(this); }
/** * Returns a builder that allows this bean to be mutated. * @return the mutable builder, not null */ public Builder toBuilder() { return new Builder(this); }
/** * Returns a builder that allows this bean to be mutated. * @return the mutable builder, not null */ public Builder toBuilder() { return new Builder(this); }
/** * Returns a builder used to create an instance of the bean. * @return the builder, not null */ public static TermDepositTemplate.Builder builder() { return new TermDepositTemplate.Builder(); }
@Override public ImmutableIborFixingDepositConvention.Builder builder() { return new ImmutableIborFixingDepositConvention.Builder(); }