public class ChainedHashTable<T extends KeyLabledObject> extends java.lang.Object implements DataStructure<T>
Modifier and Type | Field and Description |
---|---|
private java.util.ArrayList<TailedDoublyLinkedList<T>> |
chainTable |
private HashFunctionTypes |
hashFunctionType |
private ChainTableInsertionTypes |
insertionType |
private int |
tableLength |
Constructor and Description |
---|
ChainedHashTable(int tableLength,
ChainTableInsertionTypes insertionType,
HashFunctionTypes hashFunctionType) |
Modifier and Type | Method and Description |
---|---|
void |
delete(T targetObject) |
private int |
hash(int key) |
void |
insert(T newObject) |
T |
search(int key) |
private final java.util.ArrayList<TailedDoublyLinkedList<T extends KeyLabledObject>> chainTable
private final ChainTableInsertionTypes insertionType
private final HashFunctionTypes hashFunctionType
private final int tableLength
public ChainedHashTable(int tableLength, ChainTableInsertionTypes insertionType, HashFunctionTypes hashFunctionType)
public T search(int key)
search
in interface DataStructure<T extends KeyLabledObject>
private int hash(int key)
public void insert(T newObject)
insert
in interface DataStructure<T extends KeyLabledObject>
public void delete(T targetObject)
delete
in interface DataStructure<T extends KeyLabledObject>