net.sf.oval.internal.util
Class ObjectCache<K,V>
java.lang.Object
net.sf.oval.internal.util.ObjectCache<K,V>
public final class ObjectCache<K,V>
- extends Object
- Author:
- Sebastian Thomschke
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectCache
public ObjectCache()
- Creates a new cache keeping all objects.
ObjectCache
public ObjectCache(int maxObjectsToKeep)
- Parameters:
maxObjectsToKeep
- the number of cached objects that should stay in memory when GC
starts removing SoftReferences to free memory
compact
public void compact()
contains
public boolean contains(K key)
get
public V get(K key)
put
public void put(K key,
V value)
Copyright © 2005-2013 The OVal Development Team. All Rights Reserved.