Interface OpenHashFunction<E>

  • All Known Implementing Classes:
    OpenHashFunctionDouble

    public interface OpenHashFunction<E>
    Provides an interface for a hash function that can be used by a hash table with open addressing
    • Method Detail

      • hashValue

        int hashValue​(E e,
                      int i)
        Reports the hash value for a given value and probe index
        Parameters:
        e - the element whose has value is to be provided
        i - the index of probe for which a has value is being returned
        Returns:
        the hash value for this element

        Precondition: An element e of type E and an integer i, between one and the size of the hash table being supported, have been given as input.
        Postcondition: The hash value for e and i — an integer between zero and one less than the size of the hash table being supported — has been returned as output.