ptolemy.caltrop.util
Class PtCalFunction
java.lang.Object
ptolemy.caltrop.util.PtCalFunction
- All Implemented Interfaces:
- Function
public class PtCalFunction
- extends java.lang.Object
- implements Function
This class is an adapter for Function
objects that provides the Ptolemy II
ptolemy.data.Function interface. It allows them to be
seamlessly used with Ptolemy II-generated function objects.
- Since:
- Ptolemy II 4.0
- Version:
- $Id: PtCalFunction.java 57040 2010-01-27 20:52:32Z cxh $
- Author:
- Jörn W. Janneck
- See Also:
Context
,
Function
- Accepted Rating:
- Proposed Rating:
Field Summary |
private caltrop.interpreter.Function |
_function
|
Constructor Summary |
PtCalFunction(caltrop.interpreter.Function function)
Construct a PtCalFunction. |
Method Summary |
Token |
apply(Token[] args)
Apply tokens arguments to the function. |
caltrop.interpreter.Function |
getFunction()
Return Function object wrapped by this object. |
int |
getNumberOfArguments()
Return the number of arguments. |
boolean |
isCongruent(Function function)
Always return false, because the Function token is not congruent. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_function
private caltrop.interpreter.Function _function
PtCalFunction
public PtCalFunction(caltrop.interpreter.Function function)
- Construct a PtCalFunction.
- Parameters:
function
- The Function.
apply
public Token apply(Token[] args)
throws IllegalActionException
- Apply tokens arguments to the function.
- Specified by:
apply
in interface Function
- Parameters:
args
- Argument that are applied to the function.
- Returns:
- The token generated by applying the arguments to the function.
- Throws:
IllegalActionException
- If thrown by applying the function.
getNumberOfArguments
public int getNumberOfArguments()
- Return the number of arguments.
- Specified by:
getNumberOfArguments
in interface Function
- Returns:
- The number of arguments.
isCongruent
public boolean isCongruent(Function function)
- Always return false, because the Function token is not congruent.
- Specified by:
isCongruent
in interface Function
- Parameters:
function
- The function (currently ignored).
- Returns:
- Always return false.
getFunction
public caltrop.interpreter.Function getFunction()
- Return Function object wrapped by this object.
- Returns:
- The Function object.
- See Also:
Function