Utilities changes for revisions 28155:28159

The change in the equals method has been reverted, since it performed the job of a deepEquals method (now part of JDK7). The second equals method has been removed since it duplicates the java.util.Arrays work.

Command line:

svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r28155:28159 https://svn.osgeo.org/geotools/trunk/modules/library/metadata/src/main/java/org/geotools/util/Utilities.java
Revision 28155Revision 28159
 */
package org.geotools.resources;

import java.util.Arrays;
import java.util.logging.Level;
import java.util.logging.LogRecord;
 */
package org.geotools.resources;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.logging.Level;
import java.util.logging.LogRecord;
 * Convenience method for testing two objects for equality. One or both objects may be null.
 */
public static boolean equals(final Object object1, final Object object2) {
    return (object1==object2) || (object1!=null && object1.equals(object2));
}

/**
 * Returns {@code true} if the two specified objects implements exactly the same set of
 * interfaces. Only interfaces assignable to {@code base} are compared. Declaration order
 * Convenience method for testing two objects for equality. One or both objects may be null.
 */
public static boolean equals(final Object object1, final Object object2) {
    if( object1 == object2 ) return true;
    if( object1 == null || object2 == null ) return false;
    if( object1.getClass().isArray() && object2.getClass().isArray() ){
        int length1 = Array.getLength( object1 );
        int length2 = Array.getLength( object2 );
        if( length1 != length2 ) {
            return false;
}
        for( int i = 0; i < length1; i++ ){
            Object item1 = Array.get( object1, i );
            Object item2 = Array.get( object2, i );
            if( !equals( item1, item2 ) ){
                return false;
            }
        }
        return true;
    }
    else return object1.equals( object2 );
}

public static boolean equals(final float array1[], final float array2[] ){
    if( array1==array2 ) return true;
    if( array1 == null || array2 == null ) return false;
    if( array1.length != array2.length) return false;
    for( int i=0; i<array1.length; i++){
        if( array1[i] != array2[i]) return false;
    }
    return true;
}
/**
 * Returns {@code true} if the two specified objects implements exactly the same set of
 * interfaces. Only interfaces assignable to {@code base} are compared. Declaration order