flesh out serialization/deserialization code and fix build

This commit is contained in:
Joel Dice
2007-08-12 18:50:25 -06:00
parent 92ba1880d8
commit c20219df19
21 changed files with 285 additions and 163 deletions

View File

@ -79,11 +79,11 @@ public class WeakHashMap<K, V> implements Map<K, V> {
public HashMap.Cell<K, V> next;
public int hashCode;
public MyCell(K key, V value, HashMap.Cell<K, V> next) {
public MyCell(K key, V value, HashMap.Cell<K, V> next, int hashCode) {
super(key);
this.value = value;
this.next = next;
this.hashCode = (key == null ? 0 : key.hashCode());
this.hashCode = hashCode;
}
public K getKey() {
@ -115,7 +115,7 @@ public class WeakHashMap<K, V> implements Map<K, V> {
extends HashMap.MyHelper<K, V>
{
public HashMap.Cell<K, V> make(K key, V value, HashMap.Cell<K, V> next) {
return new MyCell(key, value, next);
return new MyCell(key, value, next, hash(key));
}
}
}