org.xith3d.utility.cache
Class Cache<T>

java.lang.Object
  extended by 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.


Field Summary
static int FIND_ANY
           
static int FIND_BEST
           
static int FIND_EXACT
           
static int FIND_FIRST
           
 
Constructor Summary
Cache(java.lang.String name, boolean shareable)
           
 
Method Summary
static void dumpAllCacheInfo()
           
 void dumpCacheInfo(boolean printItems)
          Prints out the cache information to the log.
 T getAny()
           
 T getBest(CacheMatchInterface<T> matcher)
           
static Cache<?> getCache(java.lang.Class<?> classType, boolean shareable)
           
 T getFirst(CacheMatchInterface<T> matcher)
           
 java.lang.String getName()
           
 void put(T o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

Cache

public Cache(java.lang.String name,
             boolean shareable)
Method Detail

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()