home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / Extras / OSpace / jgl.exe / jgl_2_0 / src / COM / objectspace / jgl / BinaryFunction.java < prev    next >
Encoding:
Java Source  |  1997-03-14  |  1.1 KB  |  32 lines

  1. // Copyright(c) 1996,1997 ObjectSpace, Inc.
  2. // Portions Copyright(c) 1995, 1996 Hewlett-Packard Company.
  3.  
  4. package COM.objectspace.jgl;
  5.  
  6. import java.io.Serializable;
  7.  
  8. /**
  9.  * BinaryFunction is the interface that must be implemented by all binary function objects.
  10.  * Every BinaryFunction object must define a single method called execute() that takes
  11.  * two objects as its arguments and returns an object. BinaryFunction objects are often
  12.  * built to operate on a specific kind of argument and must therefore cast the input
  13.  * parameters in order to process them.
  14.  * <p>
  15.  * @see COM.objectspace.jgl.UnaryPredicate
  16.  * @see COM.objectspace.jgl.BinaryPredicate
  17.  * @see COM.objectspace.jgl.UnaryFunction
  18.  * @version 2.0.2
  19.  * @author ObjectSpace, Inc.
  20.  */
  21.  
  22. public interface BinaryFunction extends Serializable
  23.   {
  24.   /**
  25.    * Return the result of executing with two Object arguments.
  26.    * @param first The first object operand.
  27.    * @param second The second object operand.
  28.    * @return The result of processing the input parameters.
  29.    */
  30.   Object execute( Object first, Object second );
  31.   }
  32.