Interface HashCollection<E>

All Superinterfaces:
All Known Implementing Classes:
ConstHashEnum, ConstHashTable, ConstHashTable.Keys, EqConstHashEnum, EqConstHashTable, EqConstHashTable.Keys, EqHashEnum, EqHashTable, EqHashTable.Keys, HashEnum, HashTable, HashTable.Keys

public interface HashCollection<E>
extends Sized
  • Field Details

  • Method Details

    • hashDensity

      float hashDensity()
    • setHashDensity

      void setHashDensity​(float hashDensity)
      Sets the hash density (1/density) of this hashing collection if applicable.

      If this procedure is not applicable for the hash collection (e.g. an immutable hash collection), calling this method has no effect.

      hashDensity - the new hash density to be set.
      IllegalArgumentException - if the passed value would have an effect but is less than or equal to 0.
    • hashEquality

      HashEqualator<? super E> hashEquality()
    • analyze

    • hasVolatileHashElements

      boolean hasVolatileHashElements()
    • hashDistributionRange

      int hashDistributionRange()
    • size

      long size()
      Specified by:
      size in interface Sized
    • rehash

      int rehash()
      Recalculates the hash value of all entries and reorginazes and optimizes the hash storage accordingly. This method is meant for cases where a hash collection has to collect its elements before proper hash values can be derived for them or where hash mutable elements can change their hash-relevant state after having been added (and hashed) in a hash collection. Note that depending on the hash-relevant state of elements and their changing of it, it can be possible that some elements oust others, thus decreasing the collection's size. This behavior depends on the type of the elements and the used hash logic and cannot be compensated by a general purpose collection implementation.
      the new size of the collection which might be lower than before the call.