public class GeneralUtilities extends 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
|
static Class<?> |
loadClass(ClassLoader cl,
String cName)
Loads the class from the given classloader or returns null (does not throw).
|
static boolean |
safeEquals(Object a,
Object b)
Returns true if a is equals to b, or both
and and b are null.
|
public static boolean safeEquals(Object a, Object b)
a
- A possibly null object to compareb
- A possibly null object to comparepublic static Class<?> loadClass(ClassLoader cl, 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 cacheCopyright © 2009-2017, Oracle and/or its affiliates. All Rights Reserved.