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

com.rosetta.test.conditionfunc.model.functions.AlwaysFalse Maven / Gradle / Ivy

There is a newer version: 11.25.1
Show newest version
package com.rosetta.test.conditionfunc.model.functions;

import com.google.inject.ImplementedBy;
import com.rosetta.model.lib.functions.RosettaFunction;
import java.util.Collections;
import java.util.List;


@ImplementedBy(AlwaysFalse.AlwaysFalseDefault.class)
public abstract class AlwaysFalse implements RosettaFunction {

	/**
	* @param synonymPath 
	* @param modelPath 
	* @param conditionValue 
	* @return result 
	*/
	public Boolean evaluate(String synonymPath, String modelPath, List conditionValue) {
		Boolean result = doEvaluate(synonymPath, modelPath, conditionValue);
		
		return result;
	}

	protected abstract Boolean doEvaluate(String synonymPath, String modelPath, List conditionValue);

	public static class AlwaysFalseDefault extends AlwaysFalse {
		@Override
		protected Boolean doEvaluate(String synonymPath, String modelPath, List conditionValue) {
			if (conditionValue == null) {
				conditionValue = Collections.emptyList();
			}
			Boolean result = null;
			return assignOutput(result, synonymPath, modelPath, conditionValue);
		}
		
		protected Boolean assignOutput(Boolean result, String synonymPath, String modelPath, List conditionValue) {
			result = false;
			
			return result;
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy