mondrian.util
Class CacheMap<S,T>
java.lang.Object
mondrian.util.CacheMap<S,T>
- All Implemented Interfaces:
- Map<S,T>
public class CacheMap<S,T>
- extends Object
- implements 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 |
Map.Entry<K,V> |
Constructor Summary |
CacheMap(int size)
Creates an empty map with limited size. |
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 Map<S,T>
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interface Map<S,T>
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interface Map<S,T>
entrySet
public Set entrySet()
- Specified by:
entrySet
in interface Map<S,T>
get
public T get(Object key)
- Specified by:
get
in interface Map<S,T>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Map<S,T>
keySet
public Set<S> keySet()
- Specified by:
keySet
in interface Map<S,T>
put
public T put(S key,
T value)
- Specified by:
put
in interface Map<S,T>
putAll
public void putAll(Map t)
- Specified by:
putAll
in interface Map<S,T>
remove
public T remove(Object key)
- Specified by:
remove
in interface Map<S,T>
size
public int size()
- Specified by:
size
in interface Map<S,T>
values
public Collection<T> values()
- Specified by:
values
in interface Map<S,T>
hashCode
public int hashCode()
- Specified by:
hashCode
in interface Map<S,T>
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
equals
public boolean equals(Object o)
- Specified by:
equals
in interface Map<S,T>
- Overrides:
equals
in class Object