2003-08-02 Michael Koch <konqueror@gmx.de>

* gnu/java/lang/ArrayHelper.java
	(equalsArray): Reformated, added method documentation.

From-SVN: r70099
This commit is contained in:
Michael Koch 2003-08-02 09:15:05 +00:00 committed by Michael Koch
parent 15b68e0201
commit 7575931c17
2 changed files with 23 additions and 12 deletions

View File

@ -1,3 +1,8 @@
2003-08-02 Michael Koch <konqueror@gmx.de>
* gnu/java/lang/ArrayHelper.java
(equalsArray): Reformated, added method documentation.
2003-08-02 Michael Koch <konqueror@gmx.de>
* java/net/URL.java

View File

@ -76,16 +76,22 @@ public class ArrayHelper
return -1;
}
public static boolean equalsArray(Object[] a, Object[] b) {
if(a.length == b.length) {
for(int i=0;i<a.length;i++) {
if(!a[i].equals(b[i])) {
/**
* Checks if two arrays are equal.
*
* @param array1 the first array
* @param array2 the second array
* @return true if both arrays are equal.
*/
public static boolean equalsArray(Object[] array1, Object[] array2)
{
if (array1.length != array2.length)
return false;
}
}
for (int index = 0; index < array1.length; index++)
if (!array1 [index].equals (array2 [index]))
return false;
return true;
} else {
return false;
}
}
}