org.springmodules.validation.util.condition.adapter
Class CommonsPredicateCondition
java.lang.Object
org.springmodules.validation.util.condition.AbstractCondition
org.springmodules.validation.util.condition.adapter.CommonsPredicateCondition
- All Implemented Interfaces:
- Condition
public class CommonsPredicateCondition
- extends AbstractCondition
A Jakarta Commmons Predicate condition adapter. This condition deligates the call to an associated {@link Predicate).
- Author:
- Uri Boness
Constructor Summary |
CommonsPredicateCondition(org.apache.commons.collections.Predicate predicate)
Constructs a new CommonsPredicateCondition with a given predicate. |
Method Summary |
boolean |
doCheck(Object object)
Checks the given object against the predicate associated with this condition. |
org.apache.commons.collections.Predicate |
getPredicate()
Returns the predicate associated with this condition. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommonsPredicateCondition
public CommonsPredicateCondition(org.apache.commons.collections.Predicate predicate)
- Constructs a new CommonsPredicateCondition with a given predicate.
- Parameters:
predicate
- The given predicate.
doCheck
public boolean doCheck(Object object)
- Checks the given object against the predicate associated with this condition.
- Specified by:
doCheck
in class AbstractCondition
- Parameters:
object
- The object to be checked.
- Returns:
- The result returned by the associated predicate when evaluting the given object.
See
Predicate.evaluate(Object)
.
getPredicate
public org.apache.commons.collections.Predicate getPredicate()
- Returns the predicate associated with this condition.
- Returns:
- The predicate associated with this condition.
Copyright © 2009. All Rights Reserved.