com.codestreet.messageforge
Class RArrayCompare

java.lang.Object
  extended bycom.codestreet.messageforge.RArrayCompare

public abstract class RArrayCompare
extends java.lang.Object

Class to compare arrays for equality. We cannot use java.util.Arrays.equals because it is not supported in JDK1.1.

Author:
Jawaid Hakim.

Constructor Summary
RArrayCompare()
           
 
Method Summary
static boolean equals(boolean[] first, boolean[] second)
          Compare boolean arrays for equality.
static boolean equals(byte[] first, byte[] second)
          Compare byte< arrays for equality.
static boolean equals(char[] first, char[] second)
          Compare char< arrays for equality.
static boolean equals(double[] first, double[] second)
          Compare double< arrays for equality.
static boolean equals(float[] first, float[] second)
          Compare float< arrays for equality.
static boolean equals(int[] first, int[] second)
          Compare int arrays for equality.
static boolean equals(long[] first, long[] second)
          Compare long< arrays for equality.
static boolean equals(java.lang.Object[] first, java.lang.Object[] second)
          Compare Object arrays for equality.
static boolean equals(short[] first, short[] second)
          Compare short arrays for equality.
static boolean equals(java.lang.String[] first, java.lang.String[] second)
          Compare String arrays for equality.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RArrayCompare

public RArrayCompare()
Method Detail

equals

public static boolean equals(short[] first,
                             short[] second)
Compare short arrays for equality.

Parameters:
first - First array.
second - Second array.
Returns:
true if the two arrays have the same length and identical entries. Otherwise, returns false.

equals

public static boolean equals(int[] first,
                             int[] second)
Compare int arrays for equality.

Parameters:
first - First array.
second - Second array.
Returns:
true if the two arrays have the same length and identical entries. Otherwise, returns false.

equals

public static boolean equals(long[] first,
                             long[] second)
Compare long< arrays for equality.

Parameters:
first - First array.
second - Second array.
Returns:
true if the two arrays have the same length and identical entries. Otherwise, returns false.

equals

public static boolean equals(float[] first,
                             float[] second)
Compare float< arrays for equality.

Parameters:
first - First array.
second - Second array.
Returns:
true if the two arrays have the same length and identical entries. Otherwise, returns false.

equals

public static boolean equals(double[] first,
                             double[] second)
Compare double< arrays for equality.

Parameters:
first - First array.
second - Second array.
Returns:
true if the two arrays have the same length and identical entries. Otherwise, returns false.

equals

public static boolean equals(char[] first,
                             char[] second)
Compare char< arrays for equality.

Parameters:
first - First array.
second - Second array.
Returns:
true if the two arrays have the same length and identical entries. Otherwise, returns false.

equals

public static boolean equals(byte[] first,
                             byte[] second)
Compare byte< arrays for equality.

Parameters:
first - First array.
second - Second array.
Returns:
true if the two arrays have the same length and identical entries. Otherwise, returns false.

equals

public static boolean equals(boolean[] first,
                             boolean[] second)
Compare boolean arrays for equality.

Parameters:
first - First array.
second - Second array.
Returns:
true if the two arrays have the same length and identical entries. Otherwise, returns false.

equals

public static boolean equals(java.lang.String[] first,
                             java.lang.String[] second)
Compare String arrays for equality.

Parameters:
first - First array.
second - Second array.
Returns:
true if the two arrays have the same length and identical entries. Otherwise, returns false. Calls equals on the entries to test for equality.

equals

public static boolean equals(java.lang.Object[] first,
                             java.lang.Object[] second)
Compare Object arrays for equality.

Parameters:
first - First array.
second - Second array.
Returns:
true if the two arrays have the same length and equal entries. Otherwise, returns false. Calls equals on the entries to test for equality.


Copyright © 2003-2006 CodeStreet. All Rights Reserved.