home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-09-10 | 670 b | 26 lines |
- // Copyright(c) 1996 ObjectSpace, Inc.
- // Portions Copyright(c) 1995, 1996 Hewlett-Packard Company.
-
- package jgl;
-
- /**
- * LessString is a binary predicate that returns true
- * if the first operand as a string is less than the second operand
- * as a string.
- * <p>
- * @version 1.1
- * @author ObjectSpace, Inc.
- */
-
- public final class LessString implements BinaryPredicate
- {
- /**
- * Return true if the first operand is less than the second operand.
- * @return first.toString() < second.toString()
- */
- public boolean execute( Object first, Object second )
- {
- return first.toString().compareTo( second.toString() ) < 0;
- }
- }
-