Algorithm
Development Kit 1.0

algs.model.search
Class StandardHash<V>

java.lang.Object
  extended by algs.model.search.StandardHash<V>
Type Parameters:
V - Type on which hashCode is invoked.
All Implemented Interfaces:
IHash<V>

public class StandardHash<V>
extends java.lang.Object
implements IHash<V>

Implements standard hashCode computation on objects.

Since:
1.0
Version:
1.0, 6/15/08
Author:
George Heineman, Gary Pollice

Constructor Summary
StandardHash(int tableSize)
          hash needs to know size of the table.
 
Method Summary
 int hash(V v)
          Compute the proper index into a hashtable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardHash

public StandardHash(int tableSize)
hash needs to know size of the table.

Method Detail

hash

public int hash(V v)
Description copied from interface: IHash
Compute the proper index into a hashtable.

Specified by:
hash in interface IHash<V>

Algorithm Development Kit 1.0

This code supports the Algorithms in a Nutshell book, published by O'Reilly Media, Inc. in November 2008. Please visit the book web page to learn of any changes to the code repository or to record a potential defect.