home *** CD-ROM | disk | FTP | other *** search
/ ActiveX Programming Unleashed CD / AXU.iso / jgl_1_1 / jgl_1_1.exe / src / BinaryFunction.java < prev    next >
Encoding:
Java Source  |  1996-09-10  |  965 b   |  29 lines

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