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

cdm.base.datetime.functions.PopOffDateList Maven / Gradle / Ivy

There is a newer version: 6.0.0-dev.89
Show newest version
package cdm.base.datetime.functions;

import com.google.inject.ImplementedBy;
import com.rosetta.model.lib.functions.RosettaFunction;
import com.rosetta.model.lib.records.Date;
import java.util.ArrayList;
import java.util.List;


@ImplementedBy(PopOffDateList.PopOffDateListDefault.class)
public abstract class PopOffDateList implements RosettaFunction {

	/**
	* @param dates List of dates.
	* @return newList The newly created list, omitting the last element of the original list.
	*/
	public List evaluate(List dates) {
		List newList = doEvaluate(dates);
		
		return newList;
	}

	protected abstract List doEvaluate(List dates);

	public static class PopOffDateListDefault extends PopOffDateList {
		@Override
		protected List doEvaluate(List dates) {
			List newList = new ArrayList<>();
			return assignOutput(newList, dates);
		}
		
		protected List assignOutput(List newList, List dates) {
			return newList;
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy