![JAR search and dependency download from the Maven repository](/logo.png)
com.g2forge.alexandria.expression.numeric.NumericVariable 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.IVariable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class NumericVariable implements IVariable, INumericExpression {
protected String name;
@Override
public INumericExpression apply(NumericEnvironment environment) {
return (environment == null) ? this : environment.lookup(this).or(this);
}
@Override
public INumericExpression reduce() {
return this;
}
@Override
public String toString() {
return getName();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy