1 /* Copyright (c) 2000-2003, jMock.org. See bundled LICENSE.txt */
2 package org.jmock.constraint;
3
4 import org.jmock.Constraint;
5
6 /***
7 * Is the value less than another {@link java.lang.Comparable} value?
8 */
9 public class IsLessThan implements Constraint {
10 private Comparable _object;
11
12 public IsLessThan(Comparable o) {
13 _object = o;
14 }
15
16 public boolean eval(Object arg) {
17 return _object.compareTo(arg) > 0;
18 }
19
20 public String toString() {
21 return "a value less than <" + _object + ">";
22 }
23 }
This page was automatically generated by Maven