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

package COM.objectspace.jgl;

import java.io.Serializable;

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

public interface UnaryFunction extends Serializable
  {
  /**
   * Return the result of executing with a single Object.
   * @param object The object to process.
   * @return The result of processing the input Object.
   */
  Object execute( Object object );
  }
