Package org.castor.xmlctf
Class CompareHelper
java.lang.Object
org.castor.xmlctf.CompareHelper
Assists in the comparison of objects. This method is used by generated
code but is not used within the CTF directly.
- Version:
- $Revision: 6785 $ $Date: 2003-10-15 09:17:49 -0600 (Wed, 15 Oct 2003) $
- Author:
- Sebastien Gignoux
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CompareHelper
public CompareHelper()
-
-
Method Details
-
equals
Compare two objects. Return true if they are both null or if they are equal. This comparison method has special handling for arrays: For arrays, each element is compared.Warning: We will throw a NullPointerException if any element of either array is null.
- Parameters:
o1
- first objecto2
- second object- Returns:
- true if both objects are both null or otherwise are equal
-
comparePrimitiveArray
Compares two arrays of primitive values. The caller should have tested that the two array have the same length and that the component type are equal.- Parameters:
o1
- The first arrayo2
- The second array- Returns:
- true if the two objects represent arrays of the same primitive values
-