// Copyright(c) 1996,1997 ObjectSpace, Inc.
// Portions Copyright(c) 1995, 1996 Hewlett-Packard Company.

package COM.objectspace.jgl;

import java.io.Serializable;

/**
 * BinaryPredicate is the interface that must be implemented by all binary predicate objects.
 * Every BinaryPredicate object must define a single method called execute() that takes
 * two objects as its arguments and returns a boolean. BinaryPredicate objects are often
 * built to operate on a specific kind of argument and must therefore cast the input
 * parameters in order to process them.
 * <p>
 * @see COM.objectspace.jgl.BinaryFunction
 * @see COM.objectspace.jgl.UnaryFunction
 * @see COM.objectspace.jgl.UnaryPredicate
 * @version 2.0.2
 * @author ObjectSpace, Inc.
 */

public interface BinaryPredicate extends Serializable
  {
  /**
   * Return the result of executing with two Object arguments.
   * @param first The first object operand.
   * @param second The second object operand.
   * @return The boolean result of processing the input parameters.
   */
  boolean execute( Object first, Object second );
  }
