Class 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$
    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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PtCalFunction

        public PtCalFunction​(caltrop.interpreter.Function function)
        Construct a PtCalFunction.
        Parameters:
        function - The Function.
    • Method Detail

      • 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