Package com.singularsys.jep
Class OperatorTable2
java.lang.Object
com.singularsys.jep.EmptyOperatorTable
com.singularsys.jep.OperatorTable2
- All Implemented Interfaces:
JepComponent,OperatorTableI,Serializable
- Direct Known Subclasses:
NullWrappedOperatorTable,StandardOperatorTable2
The basic set of operators provided as standard by Jep.
Provides the logic but does not specify the actual implementations
which is done by
StandardOperatorTable2- Author:
- Richard Morris
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe basic arithmetic comparative and logical operatorsstatic enumOperators which do not correspond tostatic enumSpecial purpose operatorsNested classes/interfaces inherited from class com.singularsys.jep.EmptyOperatorTable
EmptyOperatorTable.OperatorKey -
Constructor Summary
ConstructorsModifierConstructorDescriptionOperatorTable2(OperatorTable2 oldTable) Decorator constructor.protectedConstructor with pre-specified table of operators -
Method Summary
Modifier and TypeMethodDescriptiongetAdd()Returns the operator used for addition.getAnd()Gets the operator used for logical ANDGets the operator used for assignmentgetCross()Gets the operator used for 3D cross productGets the operator used for divisiongetDot()Gets the operator used for the dot productgetEle()Gets the operator used for getting and setting elements of a listgetEQ()Gets the operator used for equalsgetGE()Gets the operator used for greater than or equals togetGT()Gets the operator used for greater-thangetLE()Gets the operator used for less-than or equals togetList()Gets the operator used for creation of lists[1,2,3]getLT()Gets the operator used for less-thangetMod()Gets the operator used for modulusGets the operator used for multiplicationgetNE()Gets the operator used for not equalsgetNop()Gets the no-op operatorgetNot()Gets the operator used for logical NOTgetOr()Gets the operator used for logical ORgetPower()Gets the operator used for powersgetRange()Gets the operator used for specifying a rangeGets the operator used for subtractionunary division i.e.Gets the operator used for unitary minus-xgetUPlus()Gets the operator used for unary addition+xCreate a new version of this OperatorTable.Methods inherited from class com.singularsys.jep.EmptyOperatorTable
addOperator, addOperator, addOperator, appendOperator, appendOperator, entrySet, getKey, getLightWeightInstance, getNumOps, getOperator, getOperatorMap, getOperators, getOperatorsByName, getOperatorsBySymbol, init, insertOperator, insertOperator, keySet, removeOperator, removeOperator, replaceOperator, replaceOperator, setBinaryInverseOp, setDistributiveOver, setGroupOperatorRelations, setGroupOperatorRelations, setInverseOp, setPrecedenceTable, setRootOp, setStandardOperatorRelations, threadSafeMapCopy, toString
-
Constructor Details
-
OperatorTable2
public OperatorTable2() -
OperatorTable2
Decorator constructor. The new class will share the same internal table as its argument.- Parameters:
oldTable-
-
OperatorTable2
Constructor with pre-specified table of operators- Parameters:
oldMap- map with existing set of functions- Since:
- 4.0
-
-
Method Details
-
getNop
Description copied from interface:OperatorTableIGets the no-op operator- Specified by:
getNopin interfaceOperatorTableI- Overrides:
getNopin classEmptyOperatorTable
-
getAdd
Description copied from class:EmptyOperatorTableReturns the operator used for addition.- Specified by:
getAddin interfaceOperatorTableI- Overrides:
getAddin classEmptyOperatorTable
-
getSubtract
Description copied from interface:OperatorTableIGets the operator used for subtraction- Specified by:
getSubtractin interfaceOperatorTableI- Overrides:
getSubtractin classEmptyOperatorTable
-
getUMinus
Description copied from interface:OperatorTableIGets the operator used for unitary minus-x- Specified by:
getUMinusin interfaceOperatorTableI- Overrides:
getUMinusin classEmptyOperatorTable
-
getUPlus
Description copied from interface:OperatorTableIGets the operator used for unary addition+x- Specified by:
getUPlusin interfaceOperatorTableI- Overrides:
getUPlusin classEmptyOperatorTable
-
getMultiply
Description copied from interface:OperatorTableIGets the operator used for multiplication- Specified by:
getMultiplyin interfaceOperatorTableI- Overrides:
getMultiplyin classEmptyOperatorTable
-
getDivide
Description copied from interface:OperatorTableIGets the operator used for division- Specified by:
getDividein interfaceOperatorTableI- Overrides:
getDividein classEmptyOperatorTable
-
getMod
Description copied from interface:OperatorTableIGets the operator used for modulus- Specified by:
getModin interfaceOperatorTableI- Overrides:
getModin classEmptyOperatorTable
-
getUDivide
unary division i.e. 1/x or x^(-1) *- Specified by:
getUDividein interfaceOperatorTableI- Overrides:
getUDividein classEmptyOperatorTable
-
getPower
Description copied from interface:OperatorTableIGets the operator used for powers- Specified by:
getPowerin interfaceOperatorTableI- Overrides:
getPowerin classEmptyOperatorTable
-
getGT
Description copied from interface:OperatorTableIGets the operator used for greater-than- Specified by:
getGTin interfaceOperatorTableI- Overrides:
getGTin classEmptyOperatorTable
-
getLT
Description copied from interface:OperatorTableIGets the operator used for less-than- Specified by:
getLTin interfaceOperatorTableI- Overrides:
getLTin classEmptyOperatorTable
-
getEQ
Description copied from interface:OperatorTableIGets the operator used for equals- Specified by:
getEQin interfaceOperatorTableI- Overrides:
getEQin classEmptyOperatorTable
-
getLE
Description copied from interface:OperatorTableIGets the operator used for less-than or equals to- Specified by:
getLEin interfaceOperatorTableI- Overrides:
getLEin classEmptyOperatorTable
-
getGE
Description copied from interface:OperatorTableIGets the operator used for greater than or equals to- Specified by:
getGEin interfaceOperatorTableI- Overrides:
getGEin classEmptyOperatorTable
-
getNE
Description copied from interface:OperatorTableIGets the operator used for not equals- Specified by:
getNEin interfaceOperatorTableI- Overrides:
getNEin classEmptyOperatorTable
-
getAnd
Description copied from interface:OperatorTableIGets the operator used for logical AND- Specified by:
getAndin interfaceOperatorTableI- Overrides:
getAndin classEmptyOperatorTable
-
getOr
Description copied from interface:OperatorTableIGets the operator used for logical OR- Specified by:
getOrin interfaceOperatorTableI- Overrides:
getOrin classEmptyOperatorTable
-
getNot
Description copied from interface:OperatorTableIGets the operator used for logical NOT- Specified by:
getNotin interfaceOperatorTableI- Overrides:
getNotin classEmptyOperatorTable
-
getAssign
Description copied from interface:OperatorTableIGets the operator used for assignment- Specified by:
getAssignin interfaceOperatorTableI- Overrides:
getAssignin classEmptyOperatorTable
-
getDot
Description copied from interface:OperatorTableIGets the operator used for the dot product- Specified by:
getDotin interfaceOperatorTableI- Overrides:
getDotin classEmptyOperatorTable
-
getCross
Description copied from interface:OperatorTableIGets the operator used for 3D cross product- Specified by:
getCrossin interfaceOperatorTableI- Overrides:
getCrossin classEmptyOperatorTable
-
getList
Description copied from interface:OperatorTableIGets the operator used for creation of lists[1,2,3]- Specified by:
getListin interfaceOperatorTableI- Overrides:
getListin classEmptyOperatorTable
-
getEle
Description copied from interface:OperatorTableIGets the operator used for getting and setting elements of a list- Specified by:
getElein interfaceOperatorTableI- Overrides:
getElein classEmptyOperatorTable
-
getRange
Description copied from interface:OperatorTableIGets the operator used for specifying a range- Specified by:
getRangein interfaceOperatorTableI- Overrides:
getRangein classEmptyOperatorTable
-
shallowCopy
Description copied from class:EmptyOperatorTableCreate a new version of this OperatorTable. Operators are copied into new table. However, Operators whose pfmc implement JepComponent are duplicated. This means the table could be used in a separate thread without problem. Subclasses should override with method to return a table of the correct type, a typical implementation would be@Override public OperatorTableI shallowCopy() { Map<OperatorKey, Operator> map = this.threadSafeMapCopy(); return new MyOperatorTable(map); }using theEmptyOperatorTable.threadSafeMapCopy()method to return a copy of the map of operators and a constructor taking this map which uses theEmptyOperatorTable(Map)constructor.- Specified by:
shallowCopyin interfaceOperatorTableI- Overrides:
shallowCopyin classEmptyOperatorTable- Returns:
- a new Table
-