protected override void Transfer(Tuple2KeyEntry <Type, String, WeakReference>[] newTable) { int newCapacityMinus1 = newTable.Length - 1; Tuple2KeyEntry <Type, String, WeakReference>[] table = this.table; for (int a = table.Length; a-- > 0;) { Tuple2KeyEntry <Type, String, WeakReference> entry = table[a], next; while (entry != null) { next = entry.GetNextEntry(); // only handle this entry if it has still a valid value if (entry.GetValue().Target != null) { int i = entry.GetHash() & newCapacityMinus1; entry.SetNextEntry(newTable[i]); newTable[i] = entry; } entry = next; } } }
protected override bool EqualKeys(String key1, Type[] key2, Tuple2KeyEntry <String, Type[], T> entry) { return(key1.Equals(entry.GetKey1()) && Arrays.Equals(key2, entry.GetKey2())); }
protected override bool EqualKeys(Type key1, Type[] key2, Tuple2KeyEntry <Type, Type[], IGarbageProxyConstructor> entry) { return(key1.Equals(entry.GetKey1()) && Arrays.Equals(key2, entry.GetKey2())); }
protected override void EntryRemoved(Tuple2KeyEntry <Key1, Key2, V> entry) { size--; }
protected override void EntryAdded(Tuple2KeyEntry <Key1, Key2, V> entry) { size++; }
protected override Tuple2KeyEntry <Key1, Key2, V> CreateEntry(int hash, Key1 key1, Key2 key2, V value, Tuple2KeyEntry <Key1, Key2, V> nextEntry) { return(new Tuple2KeyEntry <Key1, Key2, V>(key1, key2, value, hash, nextEntry)); }
protected override bool EqualKeys(Object obj, PrefetchPath[] prefetchPaths, Tuple2KeyEntry <Object, PrefetchPath[], bool?> entry) { return(obj == entry.GetKey1() && prefetchPaths == entry.GetKey2()); }