| A Function object that accepts an arbitrary number of arguments and returns
a value of type R. The Functor interface is generally not typesafe. It is
typesafe with respect to the return type (R), but the compiler cannot ensure
that the number of arguments or their types are appropriate for any given
implementation of the Functor interface. However, three direct subclasses,
Generator, UnaryFunctor, and BindaryFunctor are typesafe,
provided their interfaces are used in leiu of this interface.
In short, if you want the compiler to enforce type safetype with respect to
the number and type of arguments, then do not use the method(s) defined by
this class: use the methods defined by the typesafe derived classes.
Copyright © 2006 David A. Hall
|