com.singularsys.jep.misc.nullwrapper
Class NullWrapperFunctionTable

java.lang.Object
  extended by com.singularsys.jep.FunctionTable
      extended by com.singularsys.jep.misc.nullwrapper.NullWrapperFunctionTable
All Implemented Interfaces:
JepComponent, java.io.Serializable

public class NullWrapperFunctionTable
extends FunctionTable

A function table which wraps all the functions in an existing table.

Since:
3.4
Author:
Richard Morris
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.singularsys.jep.FunctionTable
table
 
Constructor Summary
NullWrapperFunctionTable(FunctionTable root)
          Create a new function table which wraps all the functions in the original table.
 
Method Summary
protected  PostfixMathCommandI getSpecialFunction(java.lang.String name, PostfixMathCommandI fun)
          Handles special functions, subclasses can override this method to add treatment of special functions.
 
Methods inherited from class com.singularsys.jep.FunctionTable
addFunction, clear, containsKey, containsValue, entrySet, getFunction, getLightWeightInstance, init, isEmpty, keySet, remove, shallowCopy, size, toString, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NullWrapperFunctionTable

public NullWrapperFunctionTable(FunctionTable root)
Create a new function table which wraps all the functions in the original table. For each function in the original it will first call getSpecialFunction(String, PostfixMathCommandI) and if necessary NullWrapperFunctionFactory.getWrappedFunction(PostfixMathCommandI)

Parameters:
root - the original table
Method Detail

getSpecialFunction

protected PostfixMathCommandI getSpecialFunction(java.lang.String name,
                                                 PostfixMathCommandI fun)
Handles special functions, subclasses can override this method to add treatment of special functions. This method will replace the "if" function with NullWrappedIf

Parameters:
name - name of the function
fun - original function
Returns:
the new function or null if it is not a special function


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