home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-09-10 | 622 b | 25 lines |
- // Copyright(c) 1996 ObjectSpace, Inc.
- // Portions Copyright(c) 1995, 1996 Hewlett-Packard Company.
-
- package jgl;
-
- /**
- * LogicalNot is a unary predicate that returns true if its operand is equal to false.
- * <p>
- * @version 1.1
- * @author ObjectSpace, Inc.
- */
-
- public final class LogicalNot implements UnaryPredicate
- {
- /**
- * Perform a logical NOT.
- * @param object The operand, which must be an instance of Boolean.
- * @return true if the operand is equal to Boolean.FALSE.
- */
- public boolean execute( Object object )
- {
- return !((Boolean) object).booleanValue();
- }
- }
-