home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / Extras / OSpace / jgl.exe / jgl_2_0 / src / COM / objectspace / jgl / NotEqualString.java < prev    next >
Encoding:
Java Source  |  1997-03-14  |  634 b   |  25 lines

  1. // Copyright(c) 1997 ObjectSpace, Inc.
  2.  
  3. package COM.objectspace.jgl;
  4.  
  5. /**
  6.  * NotEqualString is a binary predicate that returns true
  7.  * if the first operand as a string is not equal to the second operand
  8.  * as a string.
  9.  * <p>
  10.  * @version 2.0.2
  11.  * @author ObjectSpace, Inc.
  12.  */
  13.  
  14. public final class NotEqualString implements BinaryPredicate
  15.   {
  16.   /**
  17.    * Return true if the first operand is not equal to the second operand.
  18.    * @return first.toString() != second.toString()
  19.    */
  20.   public boolean execute( Object first, Object second )
  21.     {
  22.     return !first.toString().equals( second.toString() );
  23.     }
  24.   }
  25.