Performance-related settings for a hashtable based collection like HashMap or HashSet.

The size of the backing Array is called the capacity of the hashtable.

  • The capacity of a new instance is specified by the given initialCapacity.
  • The capacity is increased, and the elements rehashed, when the ratio of collection size to capacity exceeds the given loadFactor.
  • The new capacity is the product of the current capacity and the given growthFactor.

no subtypes hierarchy

Initializer
Hashtable(Integer initialCapacity = ..., Float loadFactor = ..., Float growthFactor = ...)
Parameters:
  • initialCapacity = 16

    The initial capacity of the backing array.

  • loadFactor = 0.75

    The ratio between the number of elements and the capacity which triggers a rebuild of the hash set.

  • growthFactor = 2.0

    The factor used to determine the new size of the backing array when a new backing array is allocated.

Attributes
growthFactorSource Codeshared Float growthFactor

The factor used to determine the new size of the backing array when a new backing array is allocated.

initialCapacitySource Codeshared Integer initialCapacity

The initial capacity of the backing array.

loadFactorSource Codeshared Float loadFactor

The ratio between the number of elements and the capacity which triggers a rebuild of the hash set.

Inherited Attributes
Attributes inherited from: Object
Methods
capacitySource Codeshared Integer capacity(Integer length)
initialCapacityForSizeSource Codeshared Integer initialCapacityForSize(Integer size)
initialCapacityForUnknownSizeSource Codeshared Integer initialCapacityForUnknownSize()
rehashSource Codeshared Boolean rehash(Integer length, Integer capacity)
Inherited Methods
Methods inherited from: Object