org.castor.xmlctf

Class 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.
Version:
$Revision: 6785 $ $Date: 2003-10-15 09:17:49 -0600 (Wed, 15 Oct 2003) $
Author:
Sebastien Gignoux

Method Summary

static boolean
comparePrimitiveArray(Object o1, Object o2)
Compares two arrays of primitive values.
static boolean
equals(Object o1, Object o2)
Compare two objects.

Method Details

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.
Parameters:
o1 - The first array
o2 - The second array
Returns:
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.

Parameters:
o1 - first object
o2 - second object
Returns:
true if both objects are both null or otherwise are equal

Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com