If I have a java Hashtable or HashMap and load a bunch of entries with a set of keys, if I "clear()" it and then reload it with other entries using a subset of the same keys, will it reuse the same table-memory without thrashing? and not have to do a "rehash" or reallocation and rebuild of it's tables?
The reason is I have a pool of very dynamic records and want to reload them with different subsets of a common set of keyed elements efficiently - if it does not have to do any recalculations and rehashes after being cleared if I am using the same set of keys the table was originally built with that would be excellent. And I figured someone here might know rather than my spending a lot of time to go through the source code and test it :)
thanks!