org.castor.xmlctf
Class CompareHelper
java.lang.Object
org.castor.xmlctf.CompareHelper
public class CompareHelper
extends java.lang.Object
Assists in the comparison of objects. This method is used by generated
code but is not used within the CTF directly.
$Revision: 6785 $ $Date: 2003-10-15 09:17:49 -0600 (Wed, 15 Oct 2003) $static boolean | comparePrimitiveArray(Object o1, Object o2) - Compares two arrays of primitive values.
|
static boolean | equals(Object o1, Object o2) - Compare two objects.
|
comparePrimitiveArray
public static boolean comparePrimitiveArray(Object o1,
Object o2)
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.
o1
- The first arrayo2
- The second array
- true if the two objects represent arrays of the same primitive
values
equals
public static boolean equals(Object o1,
Object o2)
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.
o1
- first objecto2
- second object
- true if both objects are both null or otherwise are equal
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com