|
|||||||||||
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 EqualityHelper
DeepEquality
are deep equal, if method
deepEquals
returns true
equals
returns true
EqualityHelper
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(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 |
public boolean deepCompareFields(DeepEquality other, EqualityHelper helper)
true
if all the fields of this instance are
deep equal to the corresponding fields of the specified Employee.
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 |