|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
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:
boolean or an integral type are deep
equal, if they compare true using ==float and double are deep
equal, if they are close enough as defined by methods closeEnough
provided by class EqualityHelperDeepEquality are deep equal, if method
deepEquals returns trueequals
returns trueEqualityHelper instance passed to the
deepEquals method keeps track of instances that have
already been processed to avoid endless recursion for cyclic data
structures.
| Method Summary | |
boolean |
deepCompareFields(java.lang.Object other,
EqualityHelper helper)
Returns true if all the fields of this instance are
deep equal to the corresponding fields of the other Object. |
| Method Detail |
public boolean deepCompareFields(java.lang.Object other,
EqualityHelper helper)
true if all the fields of this instance are
deep equal to the corresponding fields of the other Object. This
means that all non-relationship fields are equal to the
corresponging fields in the other Object, and all relationship
fields are deep equal. Recursion is stopped in the equality helper
method that compares objects.
other - the object with which to compare.helper - EqualityHelper to keep track of instances that have
already been processed.
true if all the fields are deep equal;
false otherwise.
java.lang.ClassCastException - if the specified instances' type prevents
it from being compared to this instance.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||