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:
@@ -164,6 +164,17 @@ public class LRUHashMap<K,V> implements Map<K,V>
|
||||
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
|
||||
public boolean isEmpty ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user