com.singularsys.jep
Class FunctionTable
java.lang.Object
com.singularsys.jep.FunctionTable
- All Implemented Interfaces:
- JepComponent, java.io.Serializable
- Direct Known Subclasses:
- BigDecFunctionTable, CaseInsensitiveFunctionTable, NullWrapperFunctionTable, StandardFunctionTable
public class FunctionTable
- extends java.lang.Object
- implements JepComponent
A table holding details of the functions known to Jep.
This class has no functions loaded.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
table
protected java.util.Map<java.lang.String,PostfixMathCommandI> table
FunctionTable
public FunctionTable()
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
getFunction
public PostfixMathCommandI getFunction(java.lang.String name)
addFunction
public PostfixMathCommandI addFunction(java.lang.String name,
PostfixMathCommandI pfmc)
clear
public void clear()
entrySet
public java.util.Set<java.util.Map.Entry<java.lang.String,PostfixMathCommandI>> entrySet()
isEmpty
public boolean isEmpty()
keySet
public java.util.Set<java.lang.String> keySet()
size
public int size()
values
public java.util.Collection<PostfixMathCommandI> values()
containsKey
public boolean containsKey(java.lang.String key)
containsValue
public boolean containsValue(PostfixMathCommandI value)
remove
public PostfixMathCommandI remove(java.lang.String key)
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:
- this
shallowCopy
public FunctionTable shallowCopy()
- Returns a new shallow copy of this function table.
The entries in the table refer to the the same instances of the postfix math commands.
If sub-classes use pfmc's which are not thread safe
they should override this methods and set a new instance for the table.
- Returns:
- a new shallow copy of this function table
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2010 Singular Systems http://www.singularsys.com/jep