question: @ SuppressWarnings ( "nullness" ) void expand ( ) { AtomicReferenceArray < E > oldTable = table ; int oldCapacity = oldTable . length ( ) ; if ( oldCapacity >= MAXIMUM_CAPACITY ) { return ; } Strategy < K , V , E > s = Impl . this . strategy ; AtomicReferenceArray < E > newTable = newEntryArray ( oldCapacity << 1 ) ; threshold = newTable . length ( ) * 3 / 4 ; int newMask = newTable . length ( ) - 1 ; for ( int oldIndex = 0 ; oldIndex < oldCapacity ; oldIndex ++ ) { E head = oldTable . get ( oldIndex ) ; if ( head != null ) { E next = s . getNext ( head ) ; int headIndex = s . getHash ( head ) & newMask ; if ( next == null ) { newTable . set ( headIndex , head ) ; } else { E tail = head ; int tailIndex = headIndex ; for ( E last = next ; last != null ; last = s . getNext ( last ) ) { int newIndex = s . getHash ( last ) & newMask ; if ( newIndex != tailIndex ) { tailIndex = newIndex ; tail = last ; } } newTable . set ( tailIndex , tail ) ; for ( E e = head ; e != tail ; e = s . getNext ( e ) ) { K key = s . getKey ( e ) ; if ( key != null ) { int newIndex = s . getHash ( e ) & newMask ; E newNext = newTable . get ( newIndex ) ; newTable . set ( newIndex , s . copyEntry ( key , e , newNext ) ) ; } else { } } } } } table = newTable ; }
target:  Expands the table if possible.