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 OvernightIndexObservationbuild()OvernightIndexObservation.BuildereffectiveDate(LocalDate effectiveDate)Sets the effective date of the investment implied by the fixing date.OvernightIndexObservation.BuilderfixingDate(LocalDate fixingDate)Sets the date of the index fixing.Objectget(String propertyName)OvernightIndexObservation.Builderindex(OvernightIndex index)Sets the Overnight index.OvernightIndexObservation.BuildermaturityDate(LocalDate maturityDate)Sets the maturity date of the investment implied by the fixing date.OvernightIndexObservation.BuilderpublicationDate(LocalDate publicationDate)Sets the date that the rate implied by the fixing date is published.OvernightIndexObservation.Builderset(String propertyName, Object newValue)OvernightIndexObservation.Builderset(org.joda.beans.MetaProperty<?> property, Object value)StringtoString()OvernightIndexObservation.BuilderyearFraction(double yearFraction)Sets the year fraction of the investment implied by the fixing date.
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
getin interfaceorg.joda.beans.BeanBuilder<OvernightIndexObservation>- Overrides:
getin 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:
setin interfaceorg.joda.beans.BeanBuilder<OvernightIndexObservation>- Overrides:
setin 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:
toStringin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<OvernightIndexObservation>
-
-