org.onemind.commons.java.lang.ref
Class SoftHashMap
java.lang.Object
java.util.AbstractMap
org.onemind.commons.java.lang.ref.SoftHashMap
- All Implemented Interfaces:
- java.util.Map
- public class SoftHashMap
- extends java.util.AbstractMap
- Version:
- $Id: SoftHashMap.java,v 1.1 2004/10/23 15:24:35 thlee Exp $ $Name: $
Credits: Article by Heinz Kabutz at http://archive.devx.com/java/free/articles/Kabutz01/Kabutz01-1.asp
- Author:
- TiongHiang Lee (thlee@onemindsoft.org)
Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
Method Summary |
void |
clear()
|
java.util.Set |
entrySet()
|
java.lang.Object |
get(java.lang.Object key)
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Here we put the key, value pair into the HashMap using
a SoftValue object. |
java.lang.Object |
remove(java.lang.Object key)
|
int |
size()
|
Methods inherited from class java.util.AbstractMap |
clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
SoftHashMap
public SoftHashMap()
- Constructor
SoftHashMap
public SoftHashMap(int hardSize)
- Constructor
- Parameters:
hardSize
- the hard reference size to maintain
get
public java.lang.Object get(java.lang.Object key)
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
- Here we put the key, value pair into the HashMap using
a SoftValue object.
remove
public java.lang.Object remove(java.lang.Object key)
-
clear
public void clear()
-
size
public int size()
-
entrySet
public java.util.Set entrySet()
-
Copyright © 2004-2006 . All Rights Reserved.