1 package com.koushikdutta.superuser.util;
3 import java.lang.ref.SoftReference;
4 import java.util.Hashtable;
6 public class SoftReferenceHashTable<K,V> {
7 Hashtable<K, SoftReference<V>> mTable = new Hashtable<K, SoftReference<V>>();
9 public V put(K key, V value) {
10 SoftReference<V> old = mTable.put(key, new SoftReference<V>(value));
17 SoftReference<V> val = mTable.get(key);
26 public V remove(K k) {
27 SoftReference<V> v = mTable.remove(k);