io.corepro/src/main/java/com/google/gson/internal/StringMap.java
/**
   * Doubles the capacity of the hash table. Existing entries are placed in
   * the correct bucket on the enlarged table. If the current capacity is,
   * MAXIMUM_CAPACITY, this method is a no-op. Returns the table, which
   * will be new unless we were already at MAXIMUM_CAPACITY.
   */
Doubles the capacity of the hash table. Existing entries are placed in
the correct bucket on the enlarged table. If the current capacity is,
MAXIMUM_CAPACITY, this method is a no-op. Returns the table, which
will be new unless we were already at MAXIMUM_CAPACITY.
Doubles the capacity of the hash table . Existing entries are placed in the correct bucket on the enlarged table . If the current capacity is MAXIMUM_CAPACITY this method is a no - op . Returns the table which will be new unless we were already at MAXIMUM_CAPACITY .
private LinkedEntry<V>[] doubleCapacity() {
    LinkedEntry<V>[] oldTable = table;
    int oldCapacity = oldTable.length;
    if (oldCapacity == MAXIMUM_CAPACITY) {
      return oldTable;
    }
    int newCapacity = oldCapacity * 2;
    LinkedEntry<V>[] newTable = makeTable(newCapacity);
    if (size == 0) {
      return newTable;
    }
    for (int j = 0; j < oldCapacity; j++) {
      /*
       * Rehash the bucket using the minimum number of field writes.
       * This is the most subtle and delicate code in the class.
       */
      LinkedEntry<V> e = oldTable[j];
      if (e == null) {
        continue;
      }
      int highBit = e.hash & oldCapacity;
      LinkedEntry<V> broken = null;
      newTable[j | highBit] = e;
      for (LinkedEntry<V> n = e.next; n != null; e = n, n = n.next) {
        int nextHighBit = n.hash & oldCapacity;
        if (nextHighBit != highBit) {
          if (broken == null) {
            newTable[j | nextHighBit] = n;
          } else {
            broken.next = n;
          }
          broken = e;
          highBit = nextHighBit;
        }
      }
      if (broken != null) {
        broken.next = null;
      }
    }
    return newTable;
  }
private LinkedEntry < V > [ ] doubleCapacity ( ) { LinkedEntry < V > [ ] oldTable = table ; int oldCapacity = oldTable . length ; if ( oldCapacity == MAXIMUM_CAPACITY ) { return oldTable ; } int newCapacity = oldCapacity * 2 ; LinkedEntry < V > [ ] newTable = makeTable ( newCapacity ) ; if ( size == 0 ) { return newTable ; } for ( int j = 0 ; j < oldCapacity ; j ++ ) { /*
       * Rehash the bucket using the minimum number of field writes.
       * This is the most subtle and delicate code in the class.
       */ LinkedEntry < V > e = oldTable [ j ] ; if ( e == null ) { continue ; } int highBit = e . hash & oldCapacity ; LinkedEntry < V > broken = null ; newTable [ j | highBit ] = e ; for ( LinkedEntry < V > n = e . next ; n != null ; e = n , n = n . next ) { int nextHighBit = n . hash & oldCapacity ; if ( nextHighBit != highBit ) { if ( broken == null ) { newTable [ j | nextHighBit ] = n ; } else { broken . next = n ; } broken = e ; highBit = nextHighBit ; } } if ( broken != null ) { broken . next = null ; } } return newTable ; }
Doubles the capacity of the hash table.
Doubles the capacity of the hash table .