public final class Cache extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
debugCache |
Modifier and Type | Method and Description |
---|---|
static Object |
clear(Class type) |
static Object |
get(Class type) |
static Object |
put(Object obj)
Put an Object in the cache.
|
static Object |
returnCached(Object toReturn,
Object fromCache)
This always returns toReturn, but if toReturn is not equal to fromCache
then it will place fromCache back in the cache before returning.
|
static Object |
tryGet(Class type) |
public static Object put(Object obj)
obj
- the object to put in the cache.public static Object returnCached(Object toReturn, Object fromCache)
toReturn
- an Object to return.fromCache
- an Object retrieved from the Cache.