Package 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 forFunction
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$
- Author:
- Jörn W. Janneck
- See Also:
Context
,Function
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Constructor Summary
Constructors Constructor Description PtCalFunction(caltrop.interpreter.Function function)
Construct a PtCalFunction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Method Detail
-
apply
public Token apply(Token[] args) throws IllegalActionException
Apply tokens arguments to the function.- Specified by:
apply
in interfaceFunction
- 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 interfaceFunction
- 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 interfaceFunction
- 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
-
-