jsdsi
Class Util

java.lang.Object
  extended byjsdsi.Util

class Util
extends java.lang.Object

Static utility methods.

Version:
$Revision: 1.5 $ $Date: 2004/07/31 14:29:17 $
Author:
Sameer Ajmani, Sean Radford

Constructor Summary
(package private) Util()
           
 
Method Summary
(package private) static java.net.URL[] convert(java.net.URI[] uris)
          Converts an array of java.net.URIs to an array of java.net.URLs ?Temporary method whilst removing java.net.URLs from Objs.
(package private) static java.net.URI[] convert(java.net.URL[] urls)
          Converts an array of java.net.URLs to an array of java.net.URIs ?Temporary method whilst removing java.net.URLs from Objs.
(package private) static boolean equals(byte[] a, byte[] b)
           
(package private) static boolean equals(java.lang.Object[] a, java.lang.Object[] b)
          Returns true iff both parameters are null or if elements are equals().
(package private) static boolean equals(java.lang.Object a, java.lang.Object b)
          Returns true iff both parameters are null or they are equals().
(package private) static int hashCode(byte[] ba)
          Returns the hash-value for an array of bytes.
(package private) static int hashCode(java.lang.Object o)
          Returns the hash code of an object (which also can be an object array).
(package private) static int hashCode(java.lang.Object[] oa)
          Returns the hash-value for an array of objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

Util()
Method Detail

equals

static boolean equals(java.lang.Object a,
                      java.lang.Object b)
Returns true iff both parameters are null or they are equals().

Parameters:
a - object to compare with b.
b - object to compare with a.
Returns:
true iff both parameters are null or they are equals(), false otherwise.

equals

static boolean equals(java.lang.Object[] a,
                      java.lang.Object[] b)
Returns true iff both parameters are null or if elements are equals().

Parameters:
a - array of objects to compare with b.
b - array of objects to compare with a.
Returns:
true if both parameters are null or if elements are equals(), false otherwise.

equals

static boolean equals(byte[] a,
                      byte[] b)
Parameters:
a - array of bytes to compare with b
b - array of bytes to compare with a
Returns:
true if both parameters are null or if the elements are equal, false otherwise.

hashCode

static int hashCode(java.lang.Object o)
Returns the hash code of an object (which also can be an object array).

Parameters:
o - object to return the hash-value for.
Returns:
the hash-value for o.

hashCode

static int hashCode(java.lang.Object[] oa)
Returns the hash-value for an array of objects.

Parameters:
oa - object array to create the hash-value from.
Returns:
the hash-value of oa.

hashCode

static int hashCode(byte[] ba)
Returns the hash-value for an array of bytes. Unlike byte[].hashCode(), this will return a hash code based on the actual bytes within the array, and not the address.

Parameters:
ba - the byte array
Returns:
the hash code

convert

static java.net.URI[] convert(java.net.URL[] urls)
Converts an array of java.net.URLs to an array of java.net.URIs ?Temporary method whilst removing java.net.URLs from Objs.

Parameters:
urls -
Returns:

convert

static java.net.URL[] convert(java.net.URI[] uris)
Converts an array of java.net.URIs to an array of java.net.URLs ?Temporary method whilst removing java.net.URLs from Objs.

Parameters:
uris -
Returns:


Copyright © 2002-2004 M.I.T. All Rights Reserved.