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

com.g2forge.alexandria.expression.numeric.INumericExpression 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.numeric;

import com.g2forge.alexandria.expression.IExpression;
import com.g2forge.alexandria.expression.ILiteral;
import com.g2forge.alexandria.expression.eval.IEvaluator;
import com.g2forge.alexandria.expression.eval.SimpleEvaluator;
import com.g2forge.alexandria.java.nestedstate.INestedState;
import com.g2forge.alexandria.java.nestedstate.StackThreadState;

public interface INumericExpression extends IExpression {
	public static final INestedState> EVAL = new StackThreadState<>(new SimpleEvaluator<>());

	@Override
	public INumericExpression apply(NumericEnvironment environment);

	@Override
	public default > L eval(Class type) {
		return EVAL.get().eval(this, type, () -> IExpression.eval(this, type));
	}

	@Override
	public INumericExpression reduce();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy