com.tensegrity.palowebviewer.modules.util.client
Class Arrays

java.lang.Object
  extended by com.tensegrity.palowebviewer.modules.util.client.Arrays

public class Arrays
extends java.lang.Object

Helper class to work with arrays. There is need of it because GWT doesn't emulates all standart array functions.


Constructor Summary
Arrays()
           
 
Method Summary
static boolean equals(java.lang.Object[] array1, java.lang.Object[] array2)
          Checks the equality of two arrays.
static boolean equals(java.lang.Object o1, java.lang.Object o2)
          Checks the equality of two obects, which can be null.
static int indexOf(java.lang.Object[] array, java.lang.Object object)
          Returns index of the object in the array.
static java.lang.String toString(java.lang.Object[] array)
          Stringizes the array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Arrays

public Arrays()
Method Detail

indexOf

public static int indexOf(java.lang.Object[] array,
                          java.lang.Object object)
Returns index of the object in the array.

Parameters:
array - where the object is located. Can't be null.
object - the target objects. Can be null
Returns:
index of the object or -1 if the object isn't found in the array.

equals

public static boolean equals(java.lang.Object[] array1,
                             java.lang.Object[] array2)
Checks the equality of two arrays.

Parameters:
array1 - first array. Can be null.
array2 - second array. Can be null.
Returns:
true, if they are equal.

toString

public static java.lang.String toString(java.lang.Object[] array)
Stringizes the array. Moslty needed for debug purposes.

Parameters:
array - array to stringize. Can be null.
Returns:
stringized representation of the array.

equals

public static boolean equals(java.lang.Object o1,
                             java.lang.Object o2)
Checks the equality of two obects, which can be null.

Parameters:
o1 - the first object
o2 - the second object
Returns:
true if objects are equal. False otherwise.