4 Pair p[]; // entries in the hash table
5 int f; // number of full entries
7 p = new Pair[38]; f = 0;
10 public void put(String key, String value) {
12 if (f == n-1) return; // cheese -- a diary product
13 int i = key.hashCode() % n;
14 while (p[i] != null) {
15 if (key.equals(p[i].key)) {
16 p[i] = new Pair(key, value);
21 p[i] = new Pair(key, value);
25 public String get(String key) {
27 int i = key.hashCode() % n;
28 while (p[i] != null) {
29 if (key.equals(p[i].key))
40 Pair (String key, String value) {
41 this.key = key; this.value = value;