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 PostfixMathCommandI
get(java.lang.Object key)
JepComponent
getLightWeightInstance()
Gets a light-weight instance suitable for using in multiple threads.void
init(Jep jep)
Initialize the component.PostfixMathCommandI
put(java.lang.String key, PostfixMathCommandI value)
PostfixMathCommandI
remove(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:JepComponent
Gets a light-weight instance suitable for using in multiple threads.- Specified by:
getLightWeightInstance
in interfaceJepComponent
- Returns:
- either an new instance, null or 'this'.
-
init
public void init(Jep jep)
Description copied from interface:JepComponent
Initialize 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:
init
in 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)
-
-