org.apache.jdo.tck.util
Interface DeepEquality

All Known Implementing Classes:
Address, Company, Department, Insurance, Person, Project

public interface DeepEquality

This DeepEquality interface defines a method indicating whether some other object is "deep equal to" this object.

Two objects are deep equal, if all the fields are deep equal. The sematics of deep equal on the fields depends of the field type:

The EqualityHelper instance passed to the deepEquals method keeps track of instances that have already been processed to avoid endless recursion for cyclic data structures.

Since:
1.1
Author:
Michael Bouschen

Method Summary
 boolean deepCompareFields(DeepEquality other, EqualityHelper helper)
          Returns true if all the fields of this instance are deep equal to the corresponding fields of the specified Employee.
 

Method Detail

deepCompareFields

public boolean deepCompareFields(DeepEquality other,
                                 EqualityHelper helper)
Returns true if all the fields of this instance are deep equal to the corresponding fields of the specified Employee.

Parameters:
other - the object with which to compare.
helper - EqualityHelper to keep track of instances that have already been processed.
Returns:
true if all the fields are deep equal; false otherwise.
Throws:
java.lang.ClassCastException - if the specified instances' type prevents it from being compared to this instance.


Copyright © 2005 Apache Software Foundation. All Rights Reserved.