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

org.gramar.base.function.IsVariableDefinedFunction Maven / Gradle / Ivy

Go to download

A lightweght, pure-Java component that makes composite software architecture design patterns extremely consumable through code generation.

The newest version!
package org.gramar.base.function;

import java.util.List;

import javax.xml.xpath.XPathFunction;
import javax.xml.xpath.XPathFunctionException;

import org.gramar.function.GramarFunction;
import org.gramar.function.IGramarFunction;

public class IsVariableDefinedFunction extends GramarFunction implements XPathFunction, IGramarFunction {
	
	public IsVariableDefinedFunction() {
		super();
	}

	@Override
	public Object evaluate(List args) throws XPathFunctionException {
		String variableName = asStringArg(args.get(0));
		
		return context.getVariable(variableName) != null;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy