Class OvernightIndexObservation.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightIndexObservation>
-
- com.opengamma.strata.basics.index.OvernightIndexObservation.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<OvernightIndexObservation>
- Enclosing class:
- OvernightIndexObservation
public static final class OvernightIndexObservation.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightIndexObservation>
The bean-builder forOvernightIndexObservation
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OvernightIndexObservation
build()
OvernightIndexObservation.Builder
effectiveDate(LocalDate effectiveDate)
Sets the effective date of the investment implied by the fixing date.OvernightIndexObservation.Builder
fixingDate(LocalDate fixingDate)
Sets the date of the index fixing.Object
get(String propertyName)
OvernightIndexObservation.Builder
index(OvernightIndex index)
Sets the Overnight index.OvernightIndexObservation.Builder
maturityDate(LocalDate maturityDate)
Sets the maturity date of the investment implied by the fixing date.OvernightIndexObservation.Builder
publicationDate(LocalDate publicationDate)
Sets the date that the rate implied by the fixing date is published.OvernightIndexObservation.Builder
set(String propertyName, Object newValue)
OvernightIndexObservation.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
String
toString()
OvernightIndexObservation.Builder
yearFraction(double yearFraction)
Sets the year fraction of the investment implied by the fixing date.
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<OvernightIndexObservation>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightIndexObservation>
-
set
public OvernightIndexObservation.Builder set(String propertyName, Object newValue)
-
set
public OvernightIndexObservation.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<OvernightIndexObservation>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightIndexObservation>
-
build
public OvernightIndexObservation build()
-
index
public OvernightIndexObservation.Builder index(OvernightIndex index)
Sets the Overnight index.The rate will be queried from this index.
- Parameters:
index
- the new value, not null- Returns:
- this, for chaining, not null
-
fixingDate
public OvernightIndexObservation.Builder fixingDate(LocalDate fixingDate)
Sets the date of the index fixing.This is an adjusted date with any business day rule applied. Valid business days are defined by
RateIndex.getFixingCalendar()
.- Parameters:
fixingDate
- the new value, not null- Returns:
- this, for chaining, not null
-
publicationDate
public OvernightIndexObservation.Builder publicationDate(LocalDate publicationDate)
Sets the date that the rate implied by the fixing date is published.This is an adjusted date with any business day rule applied. This must be equal to
OvernightIndex.calculatePublicationFromFixing(LocalDate, ReferenceData)
.- Parameters:
publicationDate
- the new value, not null- Returns:
- this, for chaining, not null
-
effectiveDate
public OvernightIndexObservation.Builder effectiveDate(LocalDate effectiveDate)
Sets the effective date of the investment implied by the fixing date.This is an adjusted date with any business day rule applied. This must be equal to
OvernightIndex.calculateEffectiveFromFixing(LocalDate, ReferenceData)
.- Parameters:
effectiveDate
- the new value, not null- Returns:
- this, for chaining, not null
-
maturityDate
public OvernightIndexObservation.Builder maturityDate(LocalDate maturityDate)
Sets the maturity date of the investment implied by the fixing date.This is an adjusted date with any business day rule applied. This must be equal to
OvernightIndex.calculateMaturityFromEffective(LocalDate, ReferenceData)
.- Parameters:
maturityDate
- the new value, not null- Returns:
- this, for chaining, not null
-
yearFraction
public OvernightIndexObservation.Builder yearFraction(double yearFraction)
Sets the year fraction of the investment implied by the fixing date.This is calculated using the day count of the index. It represents the fraction of the year between the effective date and the maturity date. Typically the value will be close to 1 for one year and close to 0.5 for six months.
- Parameters:
yearFraction
- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightIndexObservation>
-
-