mondrian.util
Class CacheMap<S,T>
java.lang.Object
mondrian.util.CacheMap<S,T>
- All Implemented Interfaces:
- java.util.Map<S,T>
public class CacheMap<S,T>
- extends java.lang.Object
- implements java.util.Map<S,T>
Map with limited size to be used as cache.
- Author:
- lcanals, www.tasecurity.net
| Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
|
Constructor Summary |
CacheMap(int size)
Creates an empty map with limited size. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
CacheMap
public CacheMap(int size)
- Creates an empty map with limited size.
- Parameters:
size - Maximum number of mapped elements.
clear
public void clear()
- Specified by:
clear in interface java.util.Map<S,T>
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKey in interface java.util.Map<S,T>
containsValue
public boolean containsValue(java.lang.Object value)
- Specified by:
containsValue in interface java.util.Map<S,T>
entrySet
public java.util.Set entrySet()
- Specified by:
entrySet in interface java.util.Map<S,T>
get
public T get(java.lang.Object key)
- Specified by:
get in interface java.util.Map<S,T>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface java.util.Map<S,T>
keySet
public java.util.Set<S> keySet()
- Specified by:
keySet in interface java.util.Map<S,T>
put
public T put(S key,
T value)
- Specified by:
put in interface java.util.Map<S,T>
putAll
public void putAll(java.util.Map t)
- Specified by:
putAll in interface java.util.Map<S,T>
remove
public T remove(java.lang.Object key)
- Specified by:
remove in interface java.util.Map<S,T>
size
public int size()
- Specified by:
size in interface java.util.Map<S,T>
values
public java.util.Collection<T> values()
- Specified by:
values in interface java.util.Map<S,T>
hashCode
public int hashCode()
- Specified by:
hashCode in interface java.util.Map<S,T>- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals in interface java.util.Map<S,T>- Overrides:
equals in class java.lang.Object