KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > lsmp > djep > groupJep > GOperatorSet


1 /* @author rich
2  * Created on 07-Mar-2004
3  *
4  * This code is covered by a Creative Commons
5  * Attribution, Non Commercial, Share Alike license
6  * <a HREF="http://creativecommons.org/licenses/by-nc-sa/1.0">License</a>
7  */

8 package org.lsmp.djep.groupJep;
9 import org.nfunk.jep.*;
10 import org.lsmp.djep.groupJep.function.*;
11 import org.nfunk.jep.function.*;
12 /**
13  *
14  * @author Rich Morris
15  * Created on 07-Mar-2004
16  */

17 public class GOperatorSet extends OperatorSet {
18
19     /**
20      * TODO Should really change the properties of operators, might muck up simplification.
21      */

22     public GOperatorSet(GroupI group) {
23         super();
24         OP_ADD.setPFMC(new GAdd(group));
25         OP_SUBTRACT.setPFMC(new GSubtract(group));
26         OP_MULTIPLY.setPFMC(new GMultiply(group));
27         OP_DIVIDE.setPFMC(new GDivide(group));
28         OP_MOD.setPFMC(new GMod(group));
29         OP_POWER.setPFMC(new GPower(group));
30         OP_UMINUS.setPFMC(new GUMinus(group));
31         OP_LT.setPFMC(new GComparative(group,Comparative.LT));
32         OP_GT.setPFMC(new GComparative(group,Comparative.GT));
33         OP_LE.setPFMC(new GComparative(group,Comparative.LE));
34         OP_GE.setPFMC(new GComparative(group,Comparative.GE));
35         OP_NE.setPFMC(new GComparative(group,Comparative.NE));
36         OP_EQ.setPFMC(new GComparative(group,Comparative.EQ));
37
38         OP_AND.setPFMC(new GLogical(Logical.AND));
39         OP_AND.setPFMC(new GLogical(Logical.OR));
40         OP_OR.setPFMC(new GNot());
41         OP_LIST.setPFMC(new GList(group));
42     }
43
44 }
45
Popular Tags