(K key)
| 32 | } |
| 33 | |
| 34 | public V get(K key) { |
| 35 | int x = hashCodeOfKey(key); |
| 36 | if (items[x] == null) { |
| 37 | return null; |
| 38 | } |
| 39 | LinkedList<Cell<K, V>> collided = items[x]; |
| 40 | for (Cell<K, V> c : collided) { |
| 41 | if (c.equivalent(key)) { |
| 42 | return c.getValue(); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | return null; |
| 47 | } |
| 48 | |
| 49 | public void debugPrintHash() { |
| 50 | for (int i = 0; i < items.length; i++) { |
no test coverage detected