iTextSharp.text.pdf.LongHashtable.Rehash C# (CSharp) Метод

Rehash() защищенный Метод

protected Rehash ( ) : void
Результат void
        protected void Rehash()
        {
            int oldCapacity = table.Length;
            LongHashtableEntry[] oldTable = table;

            int newCapacity = oldCapacity * 2 + 1;
            LongHashtableEntry[] newTable = new LongHashtableEntry[newCapacity];

            threshold = (int) ( newCapacity * loadFactor );
            table = newTable;

            for ( int i = oldCapacity ; i-- > 0 ; ) {
                for ( LongHashtableEntry old = oldTable[i] ; old != null ; ) {
                    LongHashtableEntry e = old;
                    old = old.next;

                    int index = ( e.hash & 0x7FFFFFFF ) % newCapacity;
                    e.next = newTable[index];
                    newTable[index] = e;
                }
            }
        }