|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
com.caucho.util.HashMapImpl<K,V>
public class HashMapImpl<K,V>
HashMap which doesn't allocate a new DeployController per item.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
| Constructor Summary | |
|---|---|
HashMapImpl()
Create the hash map impl with a specific capacity. |
|
HashMapImpl(int initialCapacity)
Create the hash map impl with a specific capacity. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the cache |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet()
Returns the entry set of the cache |
V |
get(java.lang.Object key)
Get an item from the cache and make it most recently used. |
java.util.Set<K> |
keySet()
Returns the entry set of the cache |
V |
put(K key,
V value)
Puts a new item in the cache. |
V |
remove(java.lang.Object key)
Removes an item from the cache |
int |
size()
Returns the current number of entries in the cache. |
| Methods inherited from class java.util.AbstractMap |
|---|
clone, containsKey, containsValue, equals, hashCode, isEmpty, putAll, toString, values |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HashMapImpl()
initialCapacity - minimum capacity of the cachepublic HashMapImpl(int initialCapacity)
initialCapacity - minimum capacity of the cache| Method Detail |
|---|
public int size()
size in interface java.util.Map<K,V>size in class java.util.AbstractMap<K,V>public void clear()
clear in interface java.util.Map<K,V>clear in class java.util.AbstractMap<K,V>public V get(java.lang.Object key)
get in interface java.util.Map<K,V>get in class java.util.AbstractMap<K,V>key - key to lookup the item
public V put(K key,
V value)
put in interface java.util.Map<K,V>put in class java.util.AbstractMap<K,V>key - key to store datavalue - value to be stored
public V remove(java.lang.Object key)
remove in interface java.util.Map<K,V>remove in class java.util.AbstractMap<K,V>key - the key to remove
public java.util.Set<K> keySet()
keySet in interface java.util.Map<K,V>keySet in class java.util.AbstractMap<K,V>public java.util.Set<java.util.Map.Entry<K,V>> entrySet()
entrySet in interface java.util.Map<K,V>entrySet in class java.util.AbstractMap<K,V>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||