(Cell<K, V> cell)
| 113 | } |
| 114 | |
| 115 | public void remove(Cell<K, V> cell) { |
| 116 | int index = cell.hashCode() & (array.length - 1); |
| 117 | Cell<K, V> p = null; |
| 118 | for (Cell<K, V> c = array[index]; c != null; c = c.next()) { |
| 119 | if (c == cell) { |
| 120 | if (p == null) { |
| 121 | array[index] = c.next(); |
| 122 | } else { |
| 123 | p.setNext(c.next()); |
| 124 | } |
| 125 | -- size; |
| 126 | break; |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | shrink(); |
| 131 | } |
| 132 | |
| 133 | private Cell<K, V> putCell(K key, V value) { |
| 134 | Cell<K, V> c = find(key); |