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 / LogicalNot.java < prev    next >
Encoding:
Java Source  |  1997-03-14  |  645 b   |  25 lines

  1. // Copyright(c) 1996,1997 ObjectSpace, Inc.
  2. // Portions Copyright(c) 1995, 1996 Hewlett-Packard Company.
  3.  
  4. package COM.objectspace.jgl;
  5.  
  6. /**
  7.  * LogicalNot is a unary predicate that returns true if its operand is equal to false.
  8.  * <p>
  9.  * @version 2.0.2
  10.  * @author ObjectSpace, Inc.
  11.  */
  12.  
  13. public final class LogicalNot implements UnaryPredicate
  14.   {
  15.   /**
  16.    * Perform a logical NOT.
  17.    * @param object The operand, which must be an instance of Boolean.
  18.    * @return true if the operand is equal to Boolean.FALSE.
  19.    */
  20.   public boolean execute( Object object )
  21.     {
  22.     return !((Boolean) object).booleanValue();
  23.     }
  24.   }
  25.