KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > nfunk > jep > ASTConstant


1 /*****************************************************************************
2
3 JEP - Java Math Expression Parser 2.3.0
4       October 3 2004
5       (c) Copyright 2004, Nathan Funk and Richard Morris
6       See LICENSE.txt for license information.
7
8 *****************************************************************************/

9 /* Generated By:JJTree: Do not edit this line. ASTInteger.java */
10 package org.nfunk.jep;
11
12 /**
13  * Constant Node
14  */

15 public class ASTConstant extends SimpleNode {
16     private Object JavaDoc value;
17     
18     public ASTConstant(int id) {
19         super(id);
20     }
21     
22     public ASTConstant(Parser p, int id) {
23         super(p, id);
24     }
25     
26     public void setValue(Object JavaDoc val) {
27         value = val;
28     }
29     
30     public Object JavaDoc getValue() {
31         return value;
32     }
33
34     /** Accept the visitor. **/
35     public Object JavaDoc jjtAccept(ParserVisitor visitor, Object JavaDoc data) throws ParseException
36     {
37         return visitor.visit(this, data);
38     }
39     
40     public String JavaDoc toString() {
41         return "Constant: " + value;
42     }
43 }
44
Popular Tags