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

de.hakenadu.terms.visitor.eval.SimpleEvaluationVisitor Maven / Gradle / Ivy

Go to download

A light extensible java 8+ library for creating composites of terms which are evaluatable using a visitor pattern.

The newest version!
package de.hakenadu.terms.visitor.eval;

import java.util.HashMap;
import java.util.Map;

import de.hakenadu.terms.Variable;

public class SimpleEvaluationVisitor extends EvaluationVisitor {

	private final Map variableValues = new HashMap<>();

	@Override
	public void visit(final Variable variable, final EvaluationContext context) {
		context.setValue(variableValues.get(variable.getName()));
	}

	public final Map getVariableValues() {
		return variableValues;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy