1 | if (BasicEMap.this.size > 0 && object instanceof Map.Entry)↵ | | 1 | if (BasicEMap.this.size > 0 && object instanceof Map.Entry)↵
|
2 | {↵ | | 2 | {↵
|
3 | BasicEMap.this.ensureEntryDataExists();↵ | | 3 | BasicEMap.this.ensureEntryDataExists();↵
|
4 | @SuppressWarnings("unchecked") Map.Entry<K, V> otherEntry = (Map.Entry<K, V>)object;↵ | | 4 | @SuppressWarnings("unchecked") Map.Entry<K, V> otherEntry = (Map.Entry<K, V>)object;↵
|
5 | Object key = otherEntry.getKey();↵ | | 5 | Object key = otherEntry.getKey();↵
|
6 | ↵ | | |
|
7 | int hash = key == null ? 0 : key.hashCode();↵ | | 6 | int hash = key == null ? 0 : key.hashCode();↵
|
8 | int index = BasicEMap.this.indexOf(hash);↵ | | 7 | int index = BasicEMap.this.indexOf(hash);↵
|
9 | BasicEList<Entry<K, V>> eList = entryData[index];↵ | | 8 | BasicEList<Entry<K, V>> eList = entryData[index];↵
|
10 | if (eList != null)↵ | | 9 | if (eList != null)↵
|
11 | {↵ | | 10 | {↵
|
12 | @SuppressWarnings("unchecked") Entry<K, V> [] entries = (Entry<K, V> [])eList.data;↵ | | 11 | @SuppressWarnings("unchecked") Entry<K, V> [] entries = (Entry<K, V> [])eList.data;↵
|
13 | int size = eList.size;↵ | | 12 | int size = eList.size;↵
|
14 | for (int j = 0; j < size; ++j)↵ | | 13 | for (int j = 0; j < size; ++j)↵
|
15 | {↵ | | 14 | {↵
|
16 | Entry<K, V> entry = entries[j];↵ | | 15 | Entry<K, V> entry = entries[j];↵
|
17 | if (entry.getHash() == hash && entry.equals(otherEntry))↵ | | 16 | if (entry.getHash() == hash && entry.equals(otherEntry)) ↵
|
18 | {↵ | | 17 | {↵
|
| | | 18 | // BasicEMap.this.removeEntry(index, j);↵
|
| | | 19 | remove(otherEntry);↵
|
19 | return true;↵ | | 20 | return true;↵
|
20 | }↵ | | 21 | }↵
|
21 | }↵ | | 22 | }↵
|
22 | }↵ | | 23 | }↵
|
23 | }↵ | | 24 | }↵
|
24 | return false; | | 25 | return false;
|