|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springmodules.validation.util.condition.AbstractCondition
public abstract class AbstractCondition
An abstract implementation of the Condition
interface. This class takes care of the
logical operation of the condition. It is highly recommended for condition implementation to
sub-class this class when possible.
Constructor Summary | |
---|---|
AbstractCondition()
|
Method Summary | |
---|---|
protected boolean |
afterObjectChecked(Object object,
boolean originalResult)
A callback method that enables sub-classes to intercept the object checking after it was checked. |
Condition |
and(Condition condition)
See Condition.and(Condition) |
protected void |
beforeObjectChecked(Object object)
A callback method that enables sub-classes intercept the object checking before it is being checked. |
boolean |
check(Object object)
See Condition.check(Object) . |
abstract boolean |
doCheck(Object object)
Performs the actual checking of this condition on the checked object. |
Condition |
or(Condition condition)
See Condition.or(Condition) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractCondition()
Method Detail |
---|
public final boolean check(Object object)
Condition.check(Object)
.
Delegates to the doCheck(Object)
. Provides callback methods for sub-classes to intercept
the checking.
check
in interface Condition
object
- The checked object.
true
if the object adheres to this condition, false
otherwise.public abstract boolean doCheck(Object object)
object
- The object to be checked.
true
if the given object adheres to this condition, false
otherwise.public Condition and(Condition condition)
Condition.and(Condition)
and
in interface Condition
condition
- The condition to intersect with this condition.
public Condition or(Condition condition)
Condition.or(Condition)
or
in interface Condition
condition
- The condition to unite with this condition.
protected void beforeObjectChecked(Object object) throws IllegalArgumentException
IllegalArgumentException
;
object
-
IllegalArgumentException
protected boolean afterObjectChecked(Object object, boolean originalResult)
object
- The checked object.originalResult
- The original check result as returned by the specific condition implementation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |