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 classPriceIndexObservation.MetaThe meta-bean forPriceIndexObservation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Compares this observation to another based on the index and fixing date.CurrencygetCurrency()Gets the currency of the Ibor index.YearMonthgetFixingMonth()Gets the fixing month.PriceIndexgetIndex()Gets the FX index.inthashCode()Returns a hash code based on the index and fixing date.static PriceIndexObservation.Metameta()The meta-bean forPriceIndexObservation.PriceIndexObservation.MetametaBean()static PriceIndexObservationof(PriceIndex index, YearMonth fixingMonth)Creates an instance from an index and fixing date.StringtoString()
-
-
-
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:
metaBeanin interfaceorg.joda.beans.Bean
-
getIndex
public PriceIndex getIndex()
Gets the FX index.The rate will be queried from this index.
- Specified by:
getIndexin 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
-
-