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 / LessInteger.java < prev    next >
Encoding:
Java Source  |  1997-03-14  |  920 b   |  29 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.  * LessInteger is a binary predicate that assumes that both of its operands are
  8.  * instances of Integer and returns true if the first operand is less than the second operand.
  9.  * <p>
  10.  * @version 2.0.2
  11.  * @author ObjectSpace, Inc.
  12.  * @deprecated
  13.  * @see COM.objectspace.jgl.LessNumber
  14.  */
  15.  
  16. public class LessInteger implements BinaryPredicate
  17.   {
  18.   /**
  19.    * Return true if the first operand is less than the second operand.
  20.    * @param first The first operand, which must be an instance of Integer.
  21.    * @param second The second operand, which must be an instance of Integer.
  22.    * @return first < second
  23.    */
  24.   public boolean execute( Object first, Object second )
  25.     {
  26.     return ((Integer) first).intValue() < ((Integer) second).intValue();
  27.     }
  28.   }
  29.