home *** CD-ROM | disk | FTP | other *** search
/ ActiveX Programming Unleashed CD / AXU.iso / jgl_1_1 / jgl_1_1.exe / src / NotEqualTo.java < prev    next >
Encoding:
Java Source  |  1996-09-10  |  765 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.  * NotEqualTo is a binary predicate that returns false if the first operand
  8.  * is equal to the second operand using the standard Java equals() method.
  9.  * <p>
  10.  * @see jgl.EqualTo
  11.  * @version 1.1
  12.  * @author ObjectSpace, Inc.
  13.  */
  14.  
  15. public final class NotEqualTo implements BinaryPredicate
  16.   {
  17.   /**
  18.    * Compare two objects for inequality.
  19.    * @param first The first operand.
  20.    * @param second The second operand.
  21.    * @return false if the operands are equal according to the standard Java equals() method.
  22.    */
  23.   public boolean execute( Object first, Object second )
  24.     {
  25.     return !first.equals( second );
  26.     }
  27.   }
  28.