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

net.sf.aguacate.function.spi.impl.FunctionConstant Maven / Gradle / Ivy

There is a newer version: 0.10.9
Show newest version
package net.sf.aguacate.function.spi.impl;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import net.sf.aguacate.function.FunctionContext;
import net.sf.aguacate.function.FunctionEvalResult;
import net.sf.aguacate.function.spi.AbstractFunction;

public class FunctionConstant extends AbstractFunction {

	private final String[] outputContext;

	private final FunctionEvalResult result;

	public FunctionConstant(Collection methods, String name, String message, List outputContext,
			String outputName, Object value) {
		super(methods, name);
		// TODO: Message
		this.outputContext = outputContext.toArray(new String[outputContext.size()]);
		this.result = new FunctionEvalResult(null, value);
	}

	@Override
	public FunctionEvalResult evaluate(FunctionContext functionContext, Map context) {
		return result;
	}

	@Override
	public String[] getOutputContext() {
		return outputContext;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy