home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-09-10 | 765 b | 28 lines |
- // Copyright(c) 1996 ObjectSpace, Inc.
- // Portions Copyright(c) 1995, 1996 Hewlett-Packard Company.
-
- package jgl;
-
- /**
- * NotEqualTo is a binary predicate that returns false if the first operand
- * is equal to the second operand using the standard Java equals() method.
- * <p>
- * @see jgl.EqualTo
- * @version 1.1
- * @author ObjectSpace, Inc.
- */
-
- public final class NotEqualTo implements BinaryPredicate
- {
- /**
- * Compare two objects for inequality.
- * @param first The first operand.
- * @param second The second operand.
- * @return false if the operands are equal according to the standard Java equals() method.
- */
- public boolean execute( Object first, Object second )
- {
- return !first.equals( second );
- }
- }
-