Class SeasonalityDefinition

  • All Implemented Interfaces:
    Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class SeasonalityDefinition
    extends Object
    implements org.joda.beans.ImmutableBean, Serializable
    Provides the definition of seasonality for a price index curve.

    The seasonality is describe by a adjustment type and the month on month adjustments. The adjustment type is usually ShiftType.SCALED (multiplicative) or ShiftType.ABSOLUTE (additive). The month on month adjustment is an array of length 12 with the first element being the adjustment from January to February, the second element being the adjustment from February to March, and so on to the 12th element being the adjustment from December to January.

    See Also:
    Serialized Form
    • Method Detail

      • of

        public static SeasonalityDefinition of​(DoubleArray seasonalityMonthOnMonth,
                                               ShiftType adjustmentType)
        Obtains an instance of the seasonality.
        Parameters:
        seasonalityMonthOnMonth - the month-on-month seasonality
        adjustmentType - the adjustment type
        Returns:
        the instance
      • meta

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

        public DoubleArray getSeasonalityMonthOnMonth()
        Gets the month on month adjustment.

        This is an array of length 12, with the first element being the adjustment from January to February, the second element being the adjustment from February to March, and so on to the 12th element being the adjustment from December to January.

        Returns:
        the value of the property, not null
      • getAdjustmentType

        public ShiftType getAdjustmentType()
        Gets the shift type applied to the unadjusted value and the adjustment. (value, seasonality) -> adjustmentType.applyShift(value, seasonality).
        Returns:
        the value of the property, not null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object