Class ResolvedTermDeposit.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedTermDeposit>
-
- com.opengamma.strata.product.deposit.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 forResolvedTermDeposit
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResolvedTermDeposit
build()
ResolvedTermDeposit.Builder
currency(Currency currency)
Sets the primary currency.ResolvedTermDeposit.Builder
endDate(LocalDate endDate)
Sets the end date of the deposit.Object
get(String propertyName)
ResolvedTermDeposit.Builder
notional(double notional)
Sets the notional amount.ResolvedTermDeposit.Builder
rate(double rate)
Sets the fixed rate of interest.ResolvedTermDeposit.Builder
set(String propertyName, Object newValue)
ResolvedTermDeposit.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
ResolvedTermDeposit.Builder
startDate(LocalDate startDate)
Sets the start date of the deposit.String
toString()
ResolvedTermDeposit.Builder
yearFraction(double yearFraction)
Sets the year fraction between the start and end date.
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<ResolvedTermDeposit>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedTermDeposit>
-
set
public ResolvedTermDeposit.Builder set(String propertyName, Object newValue)
-
set
public ResolvedTermDeposit.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<ResolvedTermDeposit>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedTermDeposit>
-
build
public ResolvedTermDeposit build()
-
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 classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedTermDeposit>
-
-