org.valkyriercp.rules.constraint.Constraint Maven / Gradle / Ivy
package org.valkyriercp.rules.constraint;
/**
* A function object that tests one argument and returns a single
* boolean
result.
*
* A constraint tests a single argument against some conditional expression. For
* example, a "required" constraint will return true if the provided argument is
* non-null or empty, false otherwise.
*
*
* @author Keith Donald
*/
public interface Constraint {
/**
* Test the provided argument against this predicate's condition.
*
* @param argument the argument value
* @return true
if the condition was satisfied,
* false
otherwise
*/
boolean test(Object argument);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy