@Override public SeasonalityDefinition build() { return new SeasonalityDefinition( seasonalityMonthOnMonth, adjustmentType); }
/** * Obtains an instance of the seasonality. * * @param seasonalityMonthOnMonth the month-on-month seasonality * @param adjustmentType the adjustment type * @return the instance */ public static SeasonalityDefinition of(DoubleArray seasonalityMonthOnMonth, ShiftType adjustmentType) { ArgChecker.isTrue(seasonalityMonthOnMonth.size() == 12, "seasonality must be of length 12"); return new SeasonalityDefinition(seasonalityMonthOnMonth, adjustmentType); }