001 /** 002 * JEP - Java Expression Parser JEP is a Java package for parsing and evaluating mathematical expressions. It currently supports user defined 003 * variables, constant, and functions. A number of common mathematical functions and constants are included. Author: Nathan Funk Copyright (C) 004 * 2000 Nathan Funk JEP is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as 005 * published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. JEP is distributed in the 006 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 007 * PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with 008 * JEP; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 009 */ 010 011 012 /* Generated By:JJTree: Do not edit this line. ASTInteger.java */ 013 package jigcell.sbml2.jep; 014 015 /** 016 * Constant Node 017 */ 018 019 public class ASTConstant extends SimpleNode { 020 private Object value; 021 022 public ASTConstant (int id) { 023 super (id); 024 } 025 026 public ASTConstant (Parser p, int id) { 027 super (p, id); 028 } 029 030 public Object getValue () { 031 return value; 032 } 033 034 /** 035 * Accept the visitor. 036 */ 037 038 public Object jjtAccept (ParserVisitor visitor, Object data) { 039 return visitor.visit (this, data); 040 } 041 042 public void setValue (Object val) { 043 value = val; 044 } 045 046 public String toString () { 047 return value.toString (); 048 } 049 }