KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > nfunk > jep > evaluation > CommandElement


1 /*
2  *
3  * Created on 15-Aug-2003
4  */

5 package org.nfunk.jep.evaluation;
6
7 import org.nfunk.jep.function.*;
8 /**
9  *
10  * @author nathan
11  */

12 public class CommandElement {
13     public final static int VAR = 0;
14     public final static int CONST = 1;
15     public final static int FUNC = 2;
16     private int type;
17     private String JavaDoc varName;
18     private PostfixMathCommandI pfmc;
19     private int nParam;
20     private Object JavaDoc value;
21
22     /**
23      * @return The function associated with this element.
24      */

25     public final PostfixMathCommandI getPFMC() {
26         return pfmc;
27     }
28
29     /**
30      * @return The type.
31      */

32     public final int getType() {
33         return type;
34     }
35
36     /**
37      * @return The value of this element.
38      */

39     public final Object JavaDoc getValue() {
40         return value;
41     }
42
43     /**
44      * @return The variable name.
45      */

46     public final String JavaDoc getVarName() {
47         return varName;
48     }
49
50     /**
51      * @return The number of parameters.
52      */

53     public final int getNumParam() {
54         return nParam;
55     }
56
57     /**
58      * @param commandI The function associated with this element.
59      */

60     public final void setPFMC(PostfixMathCommandI commandI) {
61         pfmc = commandI;
62     }
63
64     /**
65      * @param i The type identifier.
66      */

67     public final void setType(int i) {
68         type = i;
69     }
70
71     /**
72      * @param object The value of the element.
73      */

74     public final void setValue(Object JavaDoc object) {
75         value = object;
76     }
77
78     /**
79      * @param string The name of the variable.
80      */

81     public final void setVarName(String JavaDoc string) {
82         varName = string;
83     }
84
85     /**
86      * @param i The number of parameters.
87      */

88     public final void setNumParam(int i) {
89         nParam = i;
90     }
91
92 }
93
Popular Tags