com.singularsys.jep.misc
Class FunctionSet

java.lang.Object
  extended by 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
protected  java.util.Map<java.lang.String,PostfixMathCommandI> functions
           
 
Constructor Summary
FunctionSet()
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

functions

protected java.util.Map<java.lang.String,PostfixMathCommandI> functions
Constructor Detail

FunctionSet

public FunctionSet()
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 interface JepComponent
Returns:
either an new instance, 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 interface JepComponent
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)


Copyright © 2010 Singular Systems http://www.singularsys.com/jep