de.hakenadu.terms.Constant Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of composite-terms Show documentation
Show all versions of composite-terms Show documentation
A light extensible java 8+ library for creating composites of terms which are evaluatable using a visitor pattern.
The newest version!
package de.hakenadu.terms;
import de.hakenadu.terms.visitor.Visitor;
public final class Constant implements LeafTerm {
/**
* The name of this variable
*/
private final Object value;
/**
* @param value {@link #value}
*/
public Constant(final Object value) {
super();
this.value = value;
}
/**
* @return {@link #value}
*/
public Object getValue() {
return value;
}
@Override
public void accept(final Visitor visitor, final C context) {
visitor.visit(this, context);
}
}