net.ontopia.utils
Class SoftHashMap
java.lang.Object
java.util.AbstractMap
net.ontopia.utils.SoftHashMap
- All Implemented Interfaces:
- java.util.Map
public class SoftHashMap
- extends java.util.AbstractMap
INTERNAL: A Map implementation that uses SoftReferences to
reference keys.
Nested classes/interfaces inherited from class java.util.AbstractMap |
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Field Summary |
protected java.util.Map |
hash
|
protected java.lang.ref.ReferenceQueue |
queue
|
Method Summary |
void |
clear()
|
boolean |
containsKey(java.lang.Object key)
|
java.util.Set |
entrySet()
|
java.lang.Object |
get(java.lang.Object key)
|
boolean |
isEmpty()
|
protected void |
processQueue()
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
java.lang.Object |
remove(java.lang.Object key)
|
int |
size()
|
Methods inherited from class java.util.AbstractMap |
clone, containsValue, equals, hashCode, keySet, putAll, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
hash
protected java.util.Map hash
queue
protected java.lang.ref.ReferenceQueue queue
SoftHashMap
public SoftHashMap(int initialCapacity,
float loadFactor)
SoftHashMap
public SoftHashMap(int initialCapacity)
SoftHashMap
public SoftHashMap()
SoftHashMap
public SoftHashMap(java.util.Map t)
processQueue
protected void processQueue()
size
public int size()
- Specified by:
size
in interface java.util.Map
- Overrides:
size
in class java.util.AbstractMap
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface java.util.Map
- Overrides:
isEmpty
in class java.util.AbstractMap
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKey
in interface java.util.Map
- Overrides:
containsKey
in class java.util.AbstractMap
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
get
in interface java.util.Map
- Overrides:
get
in class java.util.AbstractMap
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
- Specified by:
put
in interface java.util.Map
- Overrides:
put
in class java.util.AbstractMap
remove
public java.lang.Object remove(java.lang.Object key)
- Specified by:
remove
in interface java.util.Map
- Overrides:
remove
in class java.util.AbstractMap
clear
public void clear()
- Specified by:
clear
in interface java.util.Map
- Overrides:
clear
in class java.util.AbstractMap
entrySet
public java.util.Set entrySet()
- Specified by:
entrySet
in interface java.util.Map
- Specified by:
entrySet
in class java.util.AbstractMap
Copyright © 2000-2012 Ontopia.