org.databene.commons.validator
Class AndValidator<E>

java.lang.Object
  extended by org.databene.commons.validator.CompositeValidator<E>
      extended by org.databene.commons.validator.AndValidator<E>
All Implemented Interfaces:
Validator<E>

public class AndValidator<E>
extends CompositeValidator<E>

Composite validator that requires all component to return true. If no components exists, true is returned.

Created: 20.11.2007 09:50:13

Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.commons.validator.CompositeValidator
subValidators
 
Constructor Summary
AndValidator(Validator<E>... subValidators)
           
 
Method Summary
 boolean valid(E object)
          Checks if an object is valid.
 
Methods inherited from class org.databene.commons.validator.CompositeValidator
add, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AndValidator

public AndValidator(Validator<E>... subValidators)
Method Detail

valid

public boolean valid(E object)
Description copied from interface: Validator
Checks if an object is valid.

Parameters:
object - the object to validate
Returns:
true if the specified object is valid, otherwise false


Copyright © 2010. All Rights Reserved.