Commit 7575931c by Michael Koch Committed by Michael Koch

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

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

From-SVN: r70099
parent 15b68e02
2003-08-02 Michael Koch <konqueror@gmx.de> 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 * java/net/URL.java
(URL): Added paragraph about the (URL): Added paragraph about the
gnu.java.net.nocache_protocol_handlers property. gnu.java.net.nocache_protocol_handlers property.
......
...@@ -76,16 +76,22 @@ public class ArrayHelper ...@@ -76,16 +76,22 @@ public class ArrayHelper
return -1; return -1;
} }
public static boolean equalsArray(Object[] a, Object[] b) { /**
if(a.length == b.length) { * Checks if two arrays are equal.
for(int i=0;i<a.length;i++) { *
if(!a[i].equals(b[i])) { * @param array1 the first array
return false; * @param array2 the second array
} * @return true if both arrays are equal.
} */
return true; public static boolean equalsArray(Object[] array1, Object[] array2)
} else { {
return false; 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;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment