Added Charlie's adjustSize method.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2220 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
andrzej
2007-08-30 21:52:34 +00:00
parent 1a2cd499ba
commit e45cd42c31
@@ -164,6 +164,17 @@ public class LRUHashMap<K,V> implements Map<K,V>
return _delegate.size(); return _delegate.size();
} }
/**
* Update the overall size of the cache if an already added item changes size.
*
* @param sizeDifference the amount to adjust the size by.
*/
public void adjustSize (int sizeDifference)
{
_size += sizeDifference;
flush();
}
// documentation inherited from interface // documentation inherited from interface
public boolean isEmpty () public boolean isEmpty ()
{ {