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

  1. // Copyright(c) 1996 ObjectSpace, Inc.
  2. // Portions Copyright(c) 1995, 1996 Hewlett-Packard Company.
  3.  
  4. package jgl;
  5.  
  6. /**
  7.  * NotIdenticalTo is a binary predicate that returns true if the first operand
  8.  * is not the same object second operand using the standard Java != operator.
  9.  * <p>
  10.  * @version 1.1
  11.  * @author ObjectSpace, Inc.
  12.  */
  13.  
  14. public final class NotIdenticalTo implements BinaryPredicate
  15.   {
  16.   /**
  17.    * Compare two objects for non-identity.
  18.    * @param first The first operand.
  19.    * @param second The second operand.
  20.    * @return true if the operands are not the same object according to the !=.
  21.    */
  22.   public boolean execute( Object first, Object second )
  23.     {
  24.     return first != second;
  25.     }
  26.   }
  27.  
  28.