All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cdm.product.common.schedule.functions.PeriodsInYear Maven / Gradle / Ivy

There is a newer version: 6.0.0-dev.89
Show newest version
package cdm.product.common.schedule.functions;

import cdm.base.datetime.CalculationPeriodFrequency;
import com.google.inject.ImplementedBy;
import com.rosetta.model.lib.functions.RosettaFunction;


@ImplementedBy(PeriodsInYear.PeriodsInYearDefault.class)
public abstract class PeriodsInYear implements RosettaFunction {

	/**
	* @param frequency 
	* @return numberOfPeriods 
	*/
	public Integer evaluate(CalculationPeriodFrequency frequency) {
		Integer numberOfPeriods = doEvaluate(frequency);
		
		return numberOfPeriods;
	}

	protected abstract Integer doEvaluate(CalculationPeriodFrequency frequency);

	public static class PeriodsInYearDefault extends PeriodsInYear {
		@Override
		protected Integer doEvaluate(CalculationPeriodFrequency frequency) {
			Integer numberOfPeriods = null;
			return assignOutput(numberOfPeriods, frequency);
		}
		
		protected Integer assignOutput(Integer numberOfPeriods, CalculationPeriodFrequency frequency) {
			return numberOfPeriods;
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy