tango.util.collection.model.HashParams

interface HashParams [public] #
Base interface for hash table based collections. Provides common ways of dealing with buckets and threshholds. (It would be nice to share some of the code too, but this would require multiple inheritance here.)

Author:

Doug Lea @version 0.93

For an introduction to this package see Overview .

int defaultInitialBuckets [public, static] #
The default initial number of buckets of a non-empty HT
float defaultLoadFactor [public, static] #
The default load factor for a non-empty HT. When the proportion of elements per buckets exceeds this, the table is resized.
int buckets() [public] #
return the current number of hash table buckets
void buckets(int newCap) [public] #
Set the desired number of buckets in the hash table. Any value greater than or equal to one is OK. if different than current buckets, causes a version change

Throws:

IllegalArgumentException if newCap less than 1
float thresholdLoadFactor() [public] #
Return the current load factor threshold The Hash table occasionally checka against the load factor resizes itself if it has gone past it.
void thresholdLoadFactor(float desired) [public] #
Set the current desired load factor. Any value greater than 0 is OK. The current load is checked against it, possibly causing resize.

Throws:

IllegalArgumentException if desired is 0 or less