Class 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
    • 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 index
        fixingMonth - 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.

        Overrides:
        equals in class Object
        Parameters:
        obj - the other observation
        Returns:
        true if equal
      • hashCode

        public int hashCode()
        Returns a hash code based on the index and fixing date.

        The maturity date is ignored.

        Overrides:
        hashCode in class Object
        Returns:
        the hash code
      • meta

        public static PriceIndexObservation.Meta meta()
        The meta-bean for PriceIndexObservation.
        Returns:
        the meta-bean, not null
      • getIndex

        public PriceIndex getIndex()
        Gets the FX index.

        The rate will be queried from this index.

        Specified by:
        getIndex in interface IndexObservation
        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