Class ResolvedTermDeposit.Builder

  • All Implemented Interfaces:
    org.joda.beans.BeanBuilder<ResolvedTermDeposit>
    Enclosing class:
    ResolvedTermDeposit

    public static final class ResolvedTermDeposit.Builder
    extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedTermDeposit>
    The bean-builder for ResolvedTermDeposit.
    • Method Detail

      • currency

        public ResolvedTermDeposit.Builder currency​(Currency currency)
        Sets the primary currency.

        This is the currency of the deposit and the currency that payment is made in.

        Parameters:
        currency - the new value, not null
        Returns:
        this, for chaining, not null
      • notional

        public ResolvedTermDeposit.Builder notional​(double notional)
        Sets the notional amount.

        The amount that is deposited. It is a positive signed amount if the deposit is 'Buy', and a negative signed amount if the deposit is 'Sell'.

        The currency of the notional is specified by currency.

        Parameters:
        notional - the new value
        Returns:
        this, for chaining, not null
      • startDate

        public ResolvedTermDeposit.Builder startDate​(LocalDate startDate)
        Sets the start date of the deposit.

        This is the first date that interest accrues.

        This is an adjusted date, which should be a valid business day

        Parameters:
        startDate - the new value, not null
        Returns:
        this, for chaining, not null
      • endDate

        public ResolvedTermDeposit.Builder endDate​(LocalDate endDate)
        Sets the end date of the deposit.

        This is the last day that interest accrues. This date must be after the start date.

        This is an adjusted date, which should be a valid business day

        Parameters:
        endDate - the new value, not null
        Returns:
        this, for chaining, not null
      • yearFraction

        public ResolvedTermDeposit.Builder yearFraction​(double yearFraction)
        Sets the year fraction between the start and end date.

        The value is usually calculated using a DayCount. Typically the value will be close to 1 for one year and close to 0.5 for six months. The fraction may be greater than 1, but not less than 0.

        Parameters:
        yearFraction - the new value
        Returns:
        this, for chaining, not null
      • rate

        public ResolvedTermDeposit.Builder rate​(double rate)
        Sets the fixed rate of interest. A 5% rate will be expressed as 0.05.
        Parameters:
        rate - the new value
        Returns:
        this, for chaining, not null
      • toString

        public String toString()
        Overrides:
        toString in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedTermDeposit>