public void compact ( ) { if ( keys . length > size ) { Class < ? > [ ] newKeys = new Class < ? > [ size ] ; Object [ ] newVals = new Object [ size ] ; System . arraycopy ( keys , 0 , newKeys , 0 , size ) ; System . arraycopy ( values , 0 , newVals , 0 , size ) ; keys = newKeys ; values = newVals ; } }
Reduces memory consumption to the minimum for representing the values currently stored stored in this object .