1 /* Copyright (c) 2000-2004 jMock.org 2 */ 3 package org.jmock.core; 4 5 /** 6 * A constraint over acceptable values. 7 */ 8 public interface Constraint extends SelfDescribing 9 { 10 /** 11 * Evaluates the constraint for argument <var>o</var>. 12 * 13 * @param o the object against which the constraint is evaluated. 14 * @return <code>true</code> if <var>o</var> meets the constraint, 15 * <code>false</code> if it does not. 16 */ 17 boolean eval( Object o ); 18 } 19