org.nfunk.jep.ASTConstant Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jep Show documentation
Show all versions of jep Show documentation
JEP is a Java library for parsing and evaluating mathematical expressions. Use groupId org.fudaa to deploy it in maven central
The newest version!
/*****************************************************************************
JEP 2.4.1, Extensions 1.1.1
April 30 2007
(c) Copyright 2007, Nathan Funk and Richard Morris
See LICENSE-*.txt for license information.
*****************************************************************************/
/* Generated By:JJTree: Do not edit this line. ASTInteger.java */
package org.nfunk.jep;
/**
* Constant Node
*/
public class ASTConstant extends SimpleNode {
private Object value;
public ASTConstant(int id) {
super(id);
}
public ASTConstant(Parser p, int id) {
super(p, id);
}
public void setValue(Object val) {
value = val;
}
public Object getValue() {
return value;
}
/** Accept the visitor. **/
public Object jjtAccept(ParserVisitor visitor, Object data) throws ParseException
{
return visitor.visit(this, data);
}
public String toString() {
return "Constant: " + getValue(); // rjm needed so sub classes print properly
}
}