com.g2forge.alexandria.expression.numeric.INumericExpression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ax-expression Show documentation
Show all versions of ax-expression Show documentation
A library for expressions and their evaluation. Includes a basic implementation for math.
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();
}