Esempio n. 1
0
        protected virtual void Transfer(Tuple2KeyEntry <Key1, Key2, V>[] newTable)
        {
            int newCapacityMinus1 = newTable.Length - 1;

            Tuple2KeyEntry <Key1, Key2, V>[] table = this.table;

            for (int a = table.Length; a-- > 0;)
            {
                Tuple2KeyEntry <Key1, Key2, V> entry = table[a], next;
                while (entry != null)
                {
                    next = entry.GetNextEntry();
                    int i = entry.GetHash() & newCapacityMinus1;
                    entry.SetNextEntry(newTable[i]);
                    newTable[i] = entry;
                    entry       = next;
                }
            }
        }