org.springmodules.validation.util.condition.collection
Class IsEmptyCollectionCondition

java.lang.Object
  extended by org.springmodules.validation.util.condition.AbstractCondition
      extended by org.springmodules.validation.util.condition.NonNullAcceptingCondition
          extended by org.springmodules.validation.util.condition.collection.AbstractCollectionCondition
              extended by org.springmodules.validation.util.condition.collection.IsEmptyCollectionCondition
All Implemented Interfaces:
Condition

public class IsEmptyCollectionCondition
extends AbstractCollectionCondition

An AbstractCollectionCondition that checks whether the checked collection or array is empty.

Author:
Uri Boness

Constructor Summary
IsEmptyCollectionCondition()
           
 
Method Summary
protected  boolean checkArray(Object array)
          Checks whether the given array is empty.
protected  boolean checkCollection(Collection collection)
          Checks whether the given collection is empty.
 
Methods inherited from class org.springmodules.validation.util.condition.collection.AbstractCollectionCondition
beforeObjectChecked, doCheck
 
Methods inherited from class org.springmodules.validation.util.condition.AbstractCondition
afterObjectChecked, and, check, or
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IsEmptyCollectionCondition

public IsEmptyCollectionCondition()
Method Detail

checkArray

protected boolean checkArray(Object array)
Checks whether the given array is empty.

Specified by:
checkArray in class AbstractCollectionCondition
Parameters:
array - The array to be checked.
Returns:
true if the given array is empty, false otherwise.

checkCollection

protected boolean checkCollection(Collection collection)
Checks whether the given collection is empty.

Specified by:
checkCollection in class AbstractCollectionCondition
Parameters:
collection - The collection to be checked.
Returns:
true if the given collection is empty, false otherwise.


Copyright © 2009. All Rights Reserved.