Main Page   Packages   Class Hierarchy   Compound List   Compound Members   Related Pages  

Sct::TestFramework.DataCompare Class Reference

This class compares two instances of the same type to see if all there data members are equal. More...

List of all members.

Static Public Member Functions

boolean compare (Object o1, Object o2)
 Returns true if o1 and o2 have identical fields.

boolean compare (Object o1, Object o2, Set ignore)
 Returns true if o1 and o2 have identical fields except for those listed in ignore.


Static Public Attributes

boolean debug = false
DataCompareFailure lastFailure

Protected Member Functions

 DataCompare (Class c, Set ignore)
void getAllFields (Class c)
 Setups a the lists of Fields objects that represent primitives and objects.

void getFields (Class c)
boolean comparePrimitives (Object o1, Object o2)
 Compares the primitive fields of the two objects.

boolean compareAllArrays (Object o1, Object o2)
boolean compareArrays (Object array1, Object array2)
 Compare 2 arrays.

boolean compareRecurse (Object o1, Object o2)
 Recurse through the objectFields comparing them.


Static Protected Member Functions

boolean compareArrays (Object array1, Object array2, Set ignore)

Protected Attributes

List primitiveFields = new ArrayList()
List objectFields = new ArrayList()
List array = new ArrayList()
Set ignore


Detailed Description

This class compares two instances of the same type to see if all there data members are equal.

It decomposes each object and any references to other objects into primitives and compares these.

Author:
Matthew Palmer


Member Function Documentation

boolean Sct.TestFramework.DataCompare.compare Object    o1,
Object    o2,
Set    ignore
[static]
 

Returns true if o1 and o2 have identical fields except for those listed in ignore.

Parameters:
ignore a Set of fully qualified field names to ignore for the comparison


The documentation for this class was generated from the following file:
Generated on Mon Dec 15 19:38:53 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3