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,v 1.21 2004/04/13 16:46:05 cxh Exp $
- Author:
- Jörn W. Janneck
- See Also:
Context,
Function
- Accepted Rating:
- Proposed Rating:
|
Constructor Summary |
PtCalFunction(caltrop.interpreter.Function function)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PtCalFunction
public PtCalFunction(caltrop.interpreter.Function function)
apply
public Token apply(Token[] args)
throws IllegalActionException
- FIXME: what does this do? What are the types of the elements of
the list
- Specified by:
apply in interface Function
- Parameters:
args - The list of arguments.
- Returns:
- The result of applying the function to the given
arguments.
- Throws:
IllegalActionException - If thrown during evaluating
the function.
getNumberOfArguments
public int getNumberOfArguments()
- Return the number of arguments
- Specified by:
getNumberOfArguments in interface Function
- Returns:
- The number of arguments of the function.
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 to check congruency against.
getFunction
public caltrop.interpreter.Function getFunction()
- Return Function object wrapped by this object.
- Returns:
- The Function object.
- See Also:
Function