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

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.OrCondition
All Implemented Interfaces:
Condition

public class OrCondition
extends AbstractCompoundCondition

A compound condition that represent a logical OR of all its associated conditions.

Author:
Uri Boness

Constructor Summary
OrCondition(Collection conditions)
          Constructs a new OrCondition with the given condition collection.
OrCondition(Condition[] conditions)
          Constructs a new OrCondition with the given condition array.
 
Method Summary
 boolean doCheck(Object object)
          Checks whether at least one of the associated conditions of this condition returns 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

OrCondition

public OrCondition(Condition[] conditions)
Constructs a new OrCondition with the given condition array.

Parameters:
conditions - The conditions this condition is compound from.

OrCondition

public OrCondition(Collection conditions)
Constructs a new OrCondition with the given condition collection.

Parameters:
conditions - The conditions this condition is compound from.
Method Detail

doCheck

public boolean doCheck(Object object)
Checks whether at least one of the associated conditions of this condition returns true.

Specified by:
doCheck in class AbstractCondition
Parameters:
object - The object to be checked.
Returns:
true if at least one of the associated conditions returns true, false otherwise.


Copyright © 2009. All Rights Reserved.