org.xith3d.utility.cache
Class Cache<T>
java.lang.Object
org.xith3d.utility.cache.Cache<T>
- All Implemented Interfaces:
- org.jagatoo.datatypes.NamedObject
- Direct Known Subclasses:
- ArrayCache
public class Cache<T>
- extends java.lang.Object
- implements org.jagatoo.datatypes.NamedObject
Class that manages cached items.
|
Constructor Summary |
Cache(java.lang.String name,
boolean shareable)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FIND_ANY
public static final int FIND_ANY
- See Also:
- Constant Field Values
FIND_BEST
public static final int FIND_BEST
- See Also:
- Constant Field Values
FIND_EXACT
public static final int FIND_EXACT
- See Also:
- Constant Field Values
FIND_FIRST
public static final int FIND_FIRST
- See Also:
- Constant Field Values
Cache
public Cache(java.lang.String name,
boolean shareable)
getName
public final java.lang.String getName()
- Specified by:
getName in interface org.jagatoo.datatypes.NamedObject
getCache
public static Cache<?> getCache(java.lang.Class<?> classType,
boolean shareable)
put
public void put(T o)
getBest
public T getBest(CacheMatchInterface<T> matcher)
getFirst
public T getFirst(CacheMatchInterface<T> matcher)
getAny
public T getAny()
dumpCacheInfo
public void dumpCacheInfo(boolean printItems)
- Prints out the cache information to the log.
dumpAllCacheInfo
public static void dumpAllCacheInfo()