public class GeneralUtilities
extends java.lang.Object
Constructor and Description |
---|
GeneralUtilities() |
Modifier and Type | Method and Description |
---|---|
static <K,V> WeakHashClock<K,V> |
getWeakHashClock(boolean isWeak)
Creates a weak hash clock
|
static <K> WeakHashLRU<K> |
getWeakHashLRU(boolean isWeak)
Creates a weak hash clock
|
private static java.lang.Class<?> |
loadArrayClass(java.lang.ClassLoader cl,
java.lang.String aName) |
static java.lang.Class<?> |
loadClass(java.lang.ClassLoader cl,
java.lang.String cName)
Loads the class from the given classloader or returns null (does not throw).
|
static boolean |
safeEquals(java.lang.Object a,
java.lang.Object b)
Returns true if a is equals to b, or both
and and b are null.
|
public static boolean safeEquals(java.lang.Object a, java.lang.Object b)
a
- A possibly null object to compareb
- A possibly null object to compareprivate static java.lang.Class<?> loadArrayClass(java.lang.ClassLoader cl, java.lang.String aName)
public static java.lang.Class<?> loadClass(java.lang.ClassLoader cl, java.lang.String cName)
cl
- The non-null classloader to load the class fromcName
- The fully qualified non-null name of the class to loadpublic static <K,V> WeakHashClock<K,V> getWeakHashClock(boolean isWeak)
isWeak
- if true this will keep weak keyes, if false the keys will
be hard and will not go away even if they do not exist anywhere else
but this cachepublic static <K> WeakHashLRU<K> getWeakHashLRU(boolean isWeak)
isWeak
- if true this will keep weak keyes, if false the keys will
be hard and will not go away even if they do not exist anywhere else
but this cache