org.pentaho.reporting.libraries.base.util
public class LFUMap extends Object implements Serializable, Cloneable
Constructor Summary | |
---|---|
LFUMap(int cacheSize)
Creates a new LFU-Map with a maximum size of cacheSize entries.
|
Method Summary | |
---|---|
void | clear() |
Object | clone() |
Object | get(Object key)
Return the entry for the given key. |
int | getMaximumSize()
Returns the defined maximum size.
|
boolean | isEmpty()
Checks whether this map is empty.
|
void | put(Object key, Object value)
Puts the given value into the map using the specified non-null key. |
void | remove(Object key)
Removes the entry for the given key.
|
int | size()
Returns the number of items in this map.
|
void | validate()
Validates the map's internal datastructures. |
cacheSize
entries.
Parameters: cacheSize the maximum number of elements this map will be able to store.
Parameters: key the lookup key.
Returns: the value stored for the key or null.
Returns: the defines maximum size.
Returns: true, if the map is empty, false otherwise.
Parameters: key the key. value the value.
Parameters: key the key for which an entry should be removed.
Returns: the number of items in the map.