Package com.singularsys.jep.misc
Class FunctionSet
- java.lang.Object
-
- com.singularsys.jep.misc.FunctionSet
-
- All Implemented Interfaces:
JepComponent,java.io.Serializable
- Direct Known Subclasses:
StringFunctionSet
public class FunctionSet extends java.lang.Object implements JepComponent
Holds a set of functions. These functions can be added to the main Jep function table by including the set in the Jep constructor.Jep jep = new Jep(new StringFunctionSet());would add string functions to Jep.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,PostfixMathCommandI>functions
-
Constructor Summary
Constructors Constructor Description FunctionSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PostfixMathCommandIget(java.lang.Object key)JepComponentgetLightWeightInstance()Gets a light-weight instance suitable for using in multiple threads.voidinit(Jep jep)Initialize the component.PostfixMathCommandIput(java.lang.String key, PostfixMathCommandI value)PostfixMathCommandIremove(java.lang.Object key)
-
-
-
Field Detail
-
functions
protected java.util.Map<java.lang.String,PostfixMathCommandI> functions
-
-
Method Detail
-
getLightWeightInstance
public JepComponent getLightWeightInstance()
Description copied from interface:JepComponentGets a light-weight instance suitable for using in multiple threads.- Specified by:
getLightWeightInstancein interfaceJepComponent- Returns:
- either an new instance, null or 'this'.
-
init
public void init(Jep jep)
Description copied from interface:JepComponentInitialize the component. This methods is called whenever a component is added to Jep. Hence it allows components to keep track of the other components they may rely on.- Specified by:
initin interfaceJepComponent- Parameters:
jep- the current Jep instance
-
get
public PostfixMathCommandI get(java.lang.Object key)
-
put
public PostfixMathCommandI put(java.lang.String key, PostfixMathCommandI value)
-
remove
public PostfixMathCommandI remove(java.lang.Object key)
-
-