static < K , V > void remove ( K [ ] k , V [ ] v , int pos ) { for ( ; ; ) { int next = getMovedPosition ( k , pos ) ; K moved = k [ pos ] = k [ next ] ; v [ pos ] = v [ next ] ; if ( moved == null ) return ; // else pos = next ; } }
Removes the element at the given position of the table and the corresponding value at the same position shifting if necessary other elements and values so that all elements can be found by linear probing .