public class BitwiseOperatorTable extends StandardOperatorTable2
An operator table with a selection of bitwise operators.
The BitwiseOperatorTable can be used as a drop in replacement for the StandardOperatorTable.
jep.setComponent(new BitwiseOperatorTable("**","^"));
Note the standard symbol used for power ^ conflicts with java's symbol used for xor, the constructor for the BitwiseOperatorTable takes two strings specifying the symbols used for power and xor respectively.
Modifier and Type | Class and Description |
---|---|
static class |
BitwiseOperatorTable.BitwiseOperators |
OperatorTable2.BasicOperators, OperatorTable2.PsudoOperators, OperatorTable2.SpecialOperators
EmptyOperatorTable.OperatorKey
Constructor and Description |
---|
BitwiseOperatorTable(OperatorTable2 oldTable,
java.lang.String powerSymbol,
java.lang.String xorSymbol)
A decerator constructor.
|
BitwiseOperatorTable(java.lang.String powerSymbol,
java.lang.String xorSymbol)
Standard constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addBitOperators(java.lang.String powerSymbol,
java.lang.String xorSymbol) |
Operator |
getBitAnd() |
Operator |
getBitComp() |
Operator |
getBitOr() |
Operator |
getBitXor() |
Operator |
getLShift() |
Operator |
getRShift() |
Operator |
getURShift() |
protected void |
setBasicPfmcs()
A do nothing implementation.
|
protected void |
setBitPfmcs() |
protected void |
setPsudoPfmcs()
A do nothing implementation.
|
protected void |
setSpecialPfmcs()
A do nothing implementation.
|
getAdd, getAnd, getAssign, getCross, getDivide, getDot, getEle, getEQ, getGE, getGT, getLE, getList, getLT, getMod, getMultiply, getNE, getNop, getNot, getOr, getPower, getRange, getSubtract, getUDivide, getUMinus, getUPlus
addOperator, addOperator, appendOperator, entrySet, getKey, getLightWeightInstance, getNumOps, getOperator, getOperators, getOperatorsByName, getOperatorsBySymbol, init, insertOperator, keySet, removeOperator, removeOperator, replaceOperator, replaceOperator, setBinaryInverseOp, setDistributiveOver, setGroupOperatorRelations, setGroupOperatorRelations, setInverseOp, setPrecedenceTable, setRootOp, setStandardOperatorRelations, toString
public BitwiseOperatorTable(java.lang.String powerSymbol, java.lang.String xorSymbol)
powerSymbol
- string used to represent power.xorSymbol
- string used to represent xor.public BitwiseOperatorTable(OperatorTable2 oldTable, java.lang.String powerSymbol, java.lang.String xorSymbol)
oldTable
- table with most operators.powerSymbol
- string used to represent power.xorSymbol
- string used to represent xor.protected void setBasicPfmcs()
setBasicPfmcs
in class StandardOperatorTable2
OperatorTable2.BasicOperators
protected void setSpecialPfmcs()
setSpecialPfmcs
in class StandardOperatorTable2
OperatorTable2.SpecialOperators
protected void setPsudoPfmcs()
setPsudoPfmcs
in class StandardOperatorTable2
protected void addBitOperators(java.lang.String powerSymbol, java.lang.String xorSymbol)
protected void setBitPfmcs()
public Operator getBitAnd()
public Operator getBitOr()
public Operator getBitXor()
public Operator getBitComp()
public Operator getLShift()
public Operator getRShift()
public Operator getURShift()
Copyright © 2018 Singular Systems http://www.singularsys.com/jep