public class LinearProbingHashTable extends OpenAddressingHashTable
1: //LinearProbingHashTable.java (from zyDE 5.10.1)
3: public class LinearProbingHashTable extends OpenAddressingHashTable
4: {
5: public LinearProbingHashTable(int initialCapacity)
6: {
7: super(initialCapacity);
8: }
10: public LinearProbingHashTable()
11: {
12: // Initialize with an initial capacity of 11
13: this(11);
14: }
16: // Returns the bucket index for the specified key and i value using the
17: // linear probing sequence.
18: @Override
19: protected int probe(Object key, int i)
20: {
21: return (hash(key) + i) % table.length;
22: }
23: }