org.springmodules.validation.util.condition.common
Class AndCondition
java.lang.Object
org.springmodules.validation.util.condition.AbstractCondition
org.springmodules.validation.util.condition.common.AbstractCompoundCondition
org.springmodules.validation.util.condition.common.AndCondition
- All Implemented Interfaces:
- Condition
public class AndCondition
- extends AbstractCompoundCondition
A compound condition that represent a logical and of all its associated conditions.
- Author:
- Uri Boness
Constructor Summary |
AndCondition(Collection conditions)
Constructs a new AndCondition with the given condition collection. |
AndCondition(Condition[] conditions)
Constructs a new AndCondition with the given condition array. |
Method Summary |
boolean |
doCheck(Object object)
Checks whether all the associated conditions of this condition return true . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AndCondition
public AndCondition(Condition[] conditions)
- Constructs a new AndCondition with the given condition array.
- Parameters:
conditions
- The conditions this condition is compound from.
AndCondition
public AndCondition(Collection conditions)
- Constructs a new AndCondition with the given condition collection.
- Parameters:
conditions
- The conditions this condition is compound from.
doCheck
public boolean doCheck(Object object)
- Checks whether all the associated conditions of this condition return
true
.
- Specified by:
doCheck
in class AbstractCondition
- Parameters:
object
- The object to be checked.
- Returns:
true
if all the associated conditions return true
, false
otherwise.
Copyright © 2009. All Rights Reserved.