Package com.singularsys.extensions.xjep
Class XFunctionTable
- java.lang.Object
-
- com.singularsys.jep.FunctionTable
-
- com.singularsys.jep.standard.StandardFunctionTable
-
- com.singularsys.extensions.xjep.XFunctionTable
-
- All Implemented Interfaces:
JepComponent,java.io.Serializable
public class XFunctionTable extends StandardFunctionTable
Almost the same asStandardFunctionTableexcept therandfunctions isDirtyRandomwhich implementsDirtyFunctionto prevents cleaning byExpressionCleaner.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.singularsys.jep.FunctionTable
table
-
-
Constructor Summary
Constructors Modifier Constructor Description XFunctionTable()XFunctionTable(FunctionTable root)Decorator constructor, replaces instances ofRandombyDirtyRandom.protectedXFunctionTable(java.util.Map<java.lang.String,PostfixMathCommandI> tbl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FunctionTableshallowCopy()Returns a new shallow copy of this function table.-
Methods inherited from class com.singularsys.jep.FunctionTable
addFunction, clear, containsKey, containsValue, entrySet, getFunction, getLightWeightInstance, init, isEmpty, keySet, remove, size, threadSafeMapCopy, toString, values
-
-
-
-
Constructor Detail
-
XFunctionTable
public XFunctionTable()
-
XFunctionTable
public XFunctionTable(FunctionTable root)
Decorator constructor, replaces instances ofRandombyDirtyRandom. and instances ofThreadSafeRandombyDirtyThreadSafeRandom. If neither is defined adds arand()random function usingDirtyRandom.
-
XFunctionTable
protected XFunctionTable(java.util.Map<java.lang.String,PostfixMathCommandI> tbl)
-
-
Method Detail
-
shallowCopy
public FunctionTable shallowCopy()
Description copied from class:FunctionTableReturns a new shallow copy of this function table. Calls theFunctionTable.threadSafeMapCopy()method to ensure the table is safe to use a separate thread. All sub-classes should override this methods to create a function table of the matching type. A typical implementation would be@Override public FunctionTable shallowCopy() { Map<String,PostfixMathCommandI> newMap = this.threadSafeMapCopy(); return new myFunctionTable(newMap); }using theFunctionTable.threadSafeMapCopy()method to return a copy of the map of operators and a constructor taking this map which uses theFunctionTable(Map)constructor.- Overrides:
shallowCopyin classStandardFunctionTable- Returns:
- a new shallow copy of this function table
-
-