Class PriceIndexObservation
- java.lang.Object
-
- com.opengamma.strata.basics.index.PriceIndexObservation
-
- All Implemented Interfaces:
IndexObservation
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class PriceIndexObservation extends Object implements IndexObservation, org.joda.beans.ImmutableBean, Serializable
Information about a single observation of a Price index.Observing a Price index requires knowledge of the index and fixing date.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PriceIndexObservation.Meta
The meta-bean forPriceIndexObservation
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Compares this observation to another based on the index and fixing date.Currency
getCurrency()
Gets the currency of the Ibor index.YearMonth
getFixingMonth()
Gets the fixing month.PriceIndex
getIndex()
Gets the FX index.int
hashCode()
Returns a hash code based on the index and fixing date.static PriceIndexObservation.Meta
meta()
The meta-bean forPriceIndexObservation
.PriceIndexObservation.Meta
metaBean()
static PriceIndexObservation
of(PriceIndex index, YearMonth fixingMonth)
Creates an instance from an index and fixing date.String
toString()
-
-
-
Method Detail
-
of
public static PriceIndexObservation of(PriceIndex index, YearMonth fixingMonth)
Creates an instance from an index and fixing date.The reference data is used to find the maturity date from the fixing date.
- Parameters:
index
- the indexfixingMonth
- the fixing month- Returns:
- the rate observation
-
getCurrency
public Currency getCurrency()
Gets the currency of the Ibor index.- Returns:
- the currency of the index
-
equals
public boolean equals(Object obj)
Compares this observation to another based on the index and fixing date.The maturity date is ignored.
-
hashCode
public int hashCode()
Returns a hash code based on the index and fixing date.The maturity date is ignored.
-
meta
public static PriceIndexObservation.Meta meta()
The meta-bean forPriceIndexObservation
.- Returns:
- the meta-bean, not null
-
metaBean
public PriceIndexObservation.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getIndex
public PriceIndex getIndex()
Gets the FX index.The rate will be queried from this index.
- Specified by:
getIndex
in interfaceIndexObservation
- Returns:
- the value of the property, not null
-
getFixingMonth
public YearMonth getFixingMonth()
Gets the fixing month.The index will be observed for this month.
- Returns:
- the value of the property, not null
-
-