org.openjena.atlas.lib
Class Lib

java.lang.Object
  extended by org.openjena.atlas.lib.Lib

public class Lib
extends Object


Method Summary
static long adler32(byte[] bytes)
          Faster than CRC32, nearly as good.
static String className(Object obj)
           
static String classShortName(Class<?> cls)
           
static long crc32(byte[] bytes)
           
static
<T> boolean
equal(T obj1, T obj2)
          Return true if obj1 and obj are both null or are .equals, else return false
static
<T> boolean
equalsListAsSet(List<T> list1, List<T> list2)
          Do two lists have the same elements?
static int hashCodeObject(Object obj)
          HashCode - allow nulls
static int hashCodeObject(Object obj, int nullHashCode)
          HashCode - allow nulls
static
<T> boolean
notEqual(T obj1, T obj2)
          Return true if obj1 and obj are ! equal
static void sleep(int milliSeconds)
           
static void sync(Object object)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

sync

public static final void sync(Object object)

equal

public static final <T> boolean equal(T obj1,
                                      T obj2)
Return true if obj1 and obj are both null or are .equals, else return false


notEqual

public static final <T> boolean notEqual(T obj1,
                                         T obj2)
Return true if obj1 and obj are ! equal


className

public static final String className(Object obj)

classShortName

public static final String classShortName(Class<?> cls)

equalsListAsSet

public static <T> boolean equalsListAsSet(List<T> list1,
                                          List<T> list2)
Do two lists have the same elements?


hashCodeObject

public static final int hashCodeObject(Object obj)
HashCode - allow nulls


hashCodeObject

public static final int hashCodeObject(Object obj,
                                       int nullHashCode)
HashCode - allow nulls


sleep

public static final void sleep(int milliSeconds)

crc32

public static long crc32(byte[] bytes)

adler32

public static long adler32(byte[] bytes)
Faster than CRC32, nearly as good.

See Also:
Adler32


Licenced under the Apache License, Version 2.0