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