@ SuppressWarnings ( "unchecked" ) public void clear ( ) { this . capacity = this . initialCapacity ; this . hash_mask = capacity - 1 ; this . expandThreshold = ( int ) ( capacity * maxLoadFactor ) ; this . shrinkThreshold = ( int ) ( capacity * minLoadFactor ) ; entries = new LinkedElement [ capacity ] ; size = 0 ; modification ++ ; }
Clear the set . Resize it to the original capacity .