public class ChainingHash extends Object
| Constructor and Description |
|---|
ChainingHash(int size)
Initializing chaining hash table of
size |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(ChecksumPair pKey)
Method used to delete an object from hash table
|
void |
displayTable()
Simple method used to write out the content of hash table
|
ChecksumPair |
find(ChecksumPair pKey)
Method used to find an object in hash table using only weakSum
|
ChecksumPair |
findMatch(ChecksumPair pKey)
Method used to find an object in hash table using weakSum and strongSum
|
int |
hashFunction(ChecksumPair pKey)
Hashing function
|
void |
insert(ChecksumPair pKey)
Method inserting object into the table
|
public ChainingHash(int size)
sizesize - Size of the hash tablepublic int hashFunction(ChecksumPair pKey)
pKey - Key object that will be hashed into the tablepublic void insert(ChecksumPair pKey)
pKey - Object we are insertingpublic void delete(ChecksumPair pKey)
pKey - Object we want to delete from tablepublic ChecksumPair find(ChecksumPair pKey)
pKey - Object that we are looking forpublic ChecksumPair findMatch(ChecksumPair pKey)
pKey - Object that we are looking forpublic void displayTable()
Copyright © 2021 McEvoy Software Ltd. All rights reserved.