com.bpodgursky.jbool_expressions.Variable Maven / Gradle / Ivy
package com.bpodgursky.jbool_expressions;
import com.bpodgursky.jbool_expressions.rules.Rule;
import java.util.List;
public class Variable extends Expression {
public static final String EXPR_TYPE = "variable";
private final K value;
private Variable(K value){
this.value = value;
}
public K getValue(){
return value;
}
public String toString(){
return value.toString();
}
@Override
public Expression apply(List> rules) {
return this;
}
@Override
public boolean equals(Expression expr) {
return expr instanceof Variable && ((Variable)expr).getValue().equals(getValue());
}
public static Variable of(K value){
return new Variable(value);
}
@Override
public String getExprType() {
return EXPR_TYPE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy