/******************************************************************************
Integer Less Than Comparator

----------------------------------------------------
Copyright (c) Gunnar Gotshalks. All Rights Reserved.

Permission to use, copy, modify, and distribute this software
and its documentation for NON-COMMERCIAL purposes and
without fee is hereby granted. 
*******************************************************************************/

package FlexOr.container;

/**
Compare two integers.
<P>
@author Gunnar Gotshalks
@see java.util.Vector
@version 1.0 1999 Jan 15
*/

public class IntegerLessThan implements BinaryPredicate {

/**
Return true if integer a < integer b, else return false.
@exception if at least one of a or b is not a Integer.
*/
  public final boolean execute(final Object a, final Object b) {
    if (! ((a instanceof Integer)  &&  (b instanceof Integer))) {
      throw new BinPredParamException();
    }
    return ((Integer) a).intValue() < ((Integer) b).intValue();
  }
  
  public static boolean execute(final Integer a, final Integer b) {
	BinaryPredicate comp = new IntegerLessThan();
    return comp.execute(a, b);
  }
  
}