org.beanfabrics.validation
Class CompositeValidationState

java.lang.Object
  extended by org.beanfabrics.validation.ValidationState
      extended by org.beanfabrics.validation.CompositeValidationState

public class CompositeValidationState
extends ValidationState


Constructor Summary
CompositeValidationState(java.lang.String message, java.util.Collection<ValidationState> states)
           
CompositeValidationState(java.lang.String message, ValidationState... states)
           
 
Method Summary
static CompositeValidationState create(java.lang.String messagePrefix, ValidationState... states)
          Creates a new CompositeValidationState only if the specified list of states contains at least one ValidationState object.
 boolean equals(java.lang.Object o)
          Returns true when this instance is equal to the given object.
 java.util.List<ValidationState> getChildren()
           
 int hashCode()
           
 
Methods inherited from class org.beanfabrics.validation.ValidationState
create, getMessage
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeValidationState

public CompositeValidationState(java.lang.String message,
                                ValidationState... states)
                         throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

CompositeValidationState

public CompositeValidationState(java.lang.String message,
                                java.util.Collection<ValidationState> states)
                         throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

getChildren

public java.util.List<ValidationState> getChildren()

equals

public boolean equals(java.lang.Object o)
Description copied from class: ValidationState
Returns true when this instance is equal to the given object.

Overrides:
equals in class ValidationState
Parameters:
o - Object to compare this instance to
Returns:
boolean true if this instance and the given object are equal, else false

hashCode

public int hashCode()
Overrides:
hashCode in class ValidationState

create

public static CompositeValidationState create(java.lang.String messagePrefix,
                                              ValidationState... states)
Creates a new CompositeValidationState only if the specified list of states contains at least one ValidationState object.

Parameters:
messagePrefix -
states -
Returns:
the new CompositeValidationState