Class ModuloHashTable<T>
java.lang.Object
org.hibernate.search.util.common.data.impl.HashTable<T>
org.hibernate.search.util.common.data.impl.ModuloHashTable<T>
- Type Parameters:
T- The type of elements stored in each bucket.
- All Implemented Interfaces:
Iterable<T>
A hash table that applies a modulo operation to the hash in order to turn it into an index.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcomputeIndex(CharSequence key) Hashes akeyand computes an array index based on that hash.Methods inherited from class org.hibernate.search.util.common.data.impl.HashTable
get, get, iterator, set, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ModuloHashTable
-
-
Method Details
-
computeIndex
Description copied from class:HashTableHashes akeyand computes an array index based on that hash.The maximum index is defined by constructor parameters passed to the hash function.
- Specified by:
computeIndexin classHashTable<T>- Parameters:
key- A key to hash in order to compute an index.- Returns:
- The index to use for the given
keyin a hash table of sizesize.
-