|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nfunk.jep.OperatorSet
public class OperatorSet
The standard set of operators used in JEP.
This creates instances of the PostfixMathCommands for each operator, saving the need for multiple objects to be created. To get a reference to a particular operator use
OperatorSet opSet = jep.getOperatorSet(); Operator myOp = opSet.getAdd();
If a new operator ABC is added to the parser the this class should be extended to include a method Operator getABC().
Sub classes can change which Operator is returned by each method.
Field Summary | |
---|---|
protected Operator |
OP_ADD
|
protected Operator |
OP_AND
|
protected Operator |
OP_ASSIGN
|
protected Operator |
OP_CROSS
|
protected Operator |
OP_DIVIDE
|
protected Operator |
OP_DOT
|
protected Operator |
OP_ELEMENT
|
protected Operator |
OP_EQ
|
protected Operator |
OP_GE
|
protected Operator |
OP_GT
everyone can read but not write these operators |
protected Operator |
OP_LE
|
protected Operator |
OP_LIST
|
protected Operator |
OP_LT
|
protected Operator |
OP_MOD
|
protected Operator |
OP_MULTIPLY
|
protected Operator |
OP_NE
|
protected Operator |
OP_NOT
|
protected Operator |
OP_OR
|
protected Operator |
OP_POWER
|
protected Operator |
OP_SUBTRACT
|
protected Operator |
OP_UDIVIDE
unary division i.e. 1/x or x^(-1) |
protected Operator |
OP_UMINUS
|
Constructor Summary | |
---|---|
OperatorSet()
|
Method Summary | |
---|---|
Operator |
getAdd()
|
Operator |
getAnd()
|
Operator |
getAssign()
|
Operator |
getCross()
|
Operator |
getDivide()
|
Operator |
getDot()
|
Operator |
getElement()
|
Operator |
getEQ()
|
Operator |
getGE()
|
Operator |
getGT()
|
Operator |
getLE()
|
Operator |
getList()
|
Operator |
getLT()
|
Operator |
getMod()
|
Operator |
getMultiply()
|
Operator |
getNE()
|
Operator |
getNot()
|
Operator[] |
getOperators()
Gets the list of operators. |
Operator |
getOr()
|
Operator |
getPower()
|
Operator |
getSubtract()
|
Operator |
getUMinus()
|
void |
printOperators()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Operator OP_GT
protected Operator OP_LT
protected Operator OP_EQ
protected Operator OP_LE
protected Operator OP_GE
protected Operator OP_NE
protected Operator OP_AND
protected Operator OP_OR
protected Operator OP_NOT
protected Operator OP_ADD
protected Operator OP_SUBTRACT
protected Operator OP_UMINUS
protected Operator OP_MULTIPLY
protected Operator OP_DIVIDE
protected Operator OP_MOD
protected Operator OP_UDIVIDE
protected Operator OP_POWER
protected Operator OP_ASSIGN
protected Operator OP_DOT
protected Operator OP_CROSS
protected Operator OP_LIST
protected Operator OP_ELEMENT
Constructor Detail |
---|
public OperatorSet()
Method Detail |
---|
public Operator[] getOperators()
public void printOperators()
public Operator getAdd()
public Operator getSubtract()
public Operator getUMinus()
public Operator getMultiply()
public Operator getDivide()
public Operator getMod()
public Operator getPower()
public Operator getEQ()
public Operator getNE()
public Operator getGE()
public Operator getGT()
public Operator getLE()
public Operator getLT()
public Operator getAnd()
public Operator getOr()
public Operator getNot()
public Operator getAssign()
public Operator getDot()
public Operator getCross()
public Operator getList()
public Operator getElement()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |