|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object felix.util.MemoryFriendlyHashMap<K,V>
K
- the key typeV
- the value typepublic class MemoryFriendlyHashMap<K,V>
A memory-efficient hash map.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Constructor Summary | |
---|---|
MemoryFriendlyHashMap()
The constructor. |
|
MemoryFriendlyHashMap(java.util.Map<? extends K,? extends V> m)
The constructor with a map. |
Method Summary | |
---|---|
void |
clear()
Clears hashmap. |
boolean |
containsKey(java.lang.Object key)
Returns true if this hashmap contains the given key. |
boolean |
containsValue(java.lang.Object value)
Returns true if this hashmap contains the given value. |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet()
Returns the set of entries for this hashmap. |
boolean |
equals(java.lang.Object o)
Returns true if this hashmap equals the given object. |
V |
get(java.lang.Object key)
Returns value associated with the given key. |
int |
hashCode()
|
boolean |
isEmpty()
Returns true if this hashmap is empty. |
java.util.Set<K> |
keySet()
Returns the keyset for this hashmap. |
V |
put(K key,
V value)
Adds the given key-value pair to this hashmap. |
void |
putAll(java.util.Map<? extends K,? extends V> m)
Adds all the given key-value pairs to this hashmap. |
V |
remove(java.lang.Object key)
Removes the key-value pair associated with the given key and return the value. |
int |
size()
Returns the size of this hashmap. |
java.lang.String |
toString()
Returns a string representation of this hashmap. |
java.util.Collection<V> |
values()
Returns the values in this hashmap. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MemoryFriendlyHashMap()
public MemoryFriendlyHashMap(java.util.Map<? extends K,? extends V> m)
m
- Method Detail |
---|
public void clear()
clear
in interface java.util.Map<K,V>
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map<K,V>
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map<K,V>
public java.util.Set<java.util.Map.Entry<K,V>> entrySet()
entrySet
in interface java.util.Map<K,V>
public boolean equals(java.lang.Object o)
equals
in interface java.util.Map<K,V>
equals
in class java.lang.Object
public V get(java.lang.Object key)
get
in interface java.util.Map<K,V>
public int hashCode()
hashCode
in interface java.util.Map<K,V>
hashCode
in class java.lang.Object
public boolean isEmpty()
isEmpty
in interface java.util.Map<K,V>
public java.util.Set<K> keySet()
keySet
in interface java.util.Map<K,V>
public V put(K key, V value)
put
in interface java.util.Map<K,V>
public void putAll(java.util.Map<? extends K,? extends V> m)
putAll
in interface java.util.Map<K,V>
public V remove(java.lang.Object key)
remove
in interface java.util.Map<K,V>
public int size()
size
in interface java.util.Map<K,V>
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Collection<V> values()
values
in interface java.util.Map<K,V>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |