public void clear ( ) { this . hashSize = this . startHashSize ; this . numTables = this . startNumTables ; this . numElements = 0 ; this . hashfunctions . clear ( ) ; this . tables . clear ( ) ; int sizeTables = 1 << this . startHashSize ; for ( int i = 0 ; i < this . startNumTables ; i ++ ) { this . hashfunctions . add ( new DietzfelbingerHash ( this . startHashSize , this . random ) ) ; List < Entry < T > > table = new ArrayList < Entry < T > > ( sizeTables ) ; for ( int j = 0 ; j < sizeTables ; j ++ ) { table . add ( null ) ; } this . tables . add ( table ) ; } this . stash . clear ( ) ; this . stashSize = 0 ; }
Removes all of the elements from this hash table . The hash table will be empty after this call returns .