This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HashTable { | |
private static int INITIAL_SIZE = 16; | |
private HashEntry[] entries = new HashEntry[INITIAL_SIZE]; | |
public void put(String key, String value) { | |
int hash = getHash(key); | |
final HashEntry hashEntry = new HashEntry(key, value); | |
if(entries[hash] == null) { | |
entries[hash] = hashEntry; | |
} | |
// If there is already an entry at current hash |