|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compoze.collab.util.ArrayUtility
public class ArrayUtility
This class contains utility methods that operate on arrays.
Method Summary | |
---|---|
static boolean |
arrayContains(Object[] array,
Object obj)
Determines if an array contains a particular object (as per its equals method). |
static boolean |
compareArrays(Object[] array1,
Object[] array2)
Compares two object arrays for equality (they have the same length and equals for each element evaluates to true ). |
static boolean |
compareByteArrays(byte[] array1,
byte[] array2)
Compares two byte arrays for equality (that they have the same length and contents). |
static int |
wrapByteArrayToInt(byte[] array)
Gets an int by doing a rolling xor of bytes in the array to an int. |
static void |
xorByteArrays(byte[] input,
byte[] output)
XOR each element of byte array into another byte array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void xorByteArrays(byte[] input, byte[] output)
input
- the input array (not null
)output
- the output array (not null
)public static boolean arrayContains(Object[] array, Object obj)
equals
method).
array
- the array (not null
but may have
null
elements)obj
- the object (may be null
, in which case
array is searched for null
)public static int wrapByteArrayToInt(byte[] array)
array
- the byte array (not null
)
public static boolean compareByteArrays(byte[] array1, byte[] array2)
array1
- the first array (may be null
)array2
- the second array (may be null
)
true
if the two byte arrays have the same
length and contentspublic static boolean compareArrays(Object[] array1, Object[] array2)
equals
for each element evaluates to true
).
array1
- the first array (may be null
)array2
- the second array (may be null
)
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |