private void cleanup ( ) { Entry < K , V > [ ] tab = this . table ; for ( int i = tab . length ; i -- > 0 ; ) { for ( Entry < K , V > e = tab [ i ] , prev = null ; e != null ; e = e . next ) { if ( e . get ( ) == null ) { // Clean up after a cleared Reference. this . modCount ++ ; if ( prev != null ) { prev . next = e . next ; } else { tab [ i ] = e . next ; } this . count -- ; } else { prev = e ; } } } }
Scans the contents of this map removing all entries that have a cleared soft value .