org.springmodules.validation.util.condition.common
Class AndCondition

java.lang.Object
  extended by org.springmodules.validation.util.condition.AbstractCondition
      extended by org.springmodules.validation.util.condition.common.AbstractCompoundCondition
          extended by 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 org.springmodules.validation.util.condition.common.AbstractCompoundCondition
getConditions
 
Methods inherited from class org.springmodules.validation.util.condition.AbstractCondition
afterObjectChecked, and, beforeObjectChecked, check, or
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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.