org.unitils.objectvalidation.rules
Class EqualsComplientRule

java.lang.Object
  extended by org.unitils.objectvalidation.rules.EqualsComplientRule
All Implemented Interfaces:
Rule

public class EqualsComplientRule
extends Object
implements Rule

Verifies the seven equality rules defined by Sun : 1. Equals must be reflexive 2. Equals must be symmetric 3. Equals must be transitive 4. Equals must be consistent 5. Fails in the case of a null value 6. Inequality with a totally different object of the same type created randomly 7. Inequality with a totally different object

Since:
Oct 16, 2013
Author:
Jeroen Horemans, Matthieu Mestrez

Constructor Summary
EqualsComplientRule(ObjectCreator randomFactory, ObjectCloner objectCloner)
           
 
Method Summary
 void validate(Class<?> bean)
          Will run the validations on the java class passed in parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EqualsComplientRule

public EqualsComplientRule(ObjectCreator randomFactory,
                           ObjectCloner objectCloner)
Method Detail

validate

public void validate(Class<?> bean)
Description copied from interface: Rule
Will run the validations on the java class passed in parameter.

Specified by:
validate in interface Rule


Copyright © 2013-2015. All Rights Reserved.