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

com.g2forge.alexandria.expression.eval.IEvaluator Maven / Gradle / Ivy

Go to download

A library for expressions and their evaluation. Includes a basic implementation for math.

There is a newer version: 0.0.18
Show newest version
package com.g2forge.alexandria.expression.eval;

import java.util.function.Supplier;

import com.g2forge.alexandria.expression.ExpressionNotEvaluableException;
import com.g2forge.alexandria.expression.IEnvironment;
import com.g2forge.alexandria.expression.IExpression;
import com.g2forge.alexandria.expression.IVariable;
import com.g2forge.alexandria.java.close.ICloseable;
import com.g2forge.alexandria.java.function.IFunction2;

public interface IEvaluator, N extends IEnvironment, E extends IExpression> {
	public E apply(E expression, N environment, Supplier supplier);

	public E apply(String description, E expression, N environment);

	public ICloseable debug();

	public  T eval(E expression, Class type, Supplier supplier) throws ExpressionNotEvaluableException;

	public  T eval(String description, E expression, Class type, IFunction2, ? extends T> function) throws ExpressionNotEvaluableException;

	public E reduce(E expression, Supplier supplier);

	public E reduce(String description, E expression);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy