(BiEntry<K, V> entry, @Nullable BiEntry<K, V> oldEntryForKey)
| 180 | } |
| 181 | |
| 182 | private void insert(BiEntry<K, V> entry, @Nullable BiEntry<K, V> oldEntryForKey) { |
| 183 | int keyBucket = entry.keyHash & mask; |
| 184 | entry.nextInKToVBucket = hashTableKToV[keyBucket]; |
| 185 | hashTableKToV[keyBucket] = entry; |
| 186 | |
| 187 | int valueBucket = entry.valueHash & mask; |
| 188 | entry.nextInVToKBucket = hashTableVToK[valueBucket]; |
| 189 | hashTableVToK[valueBucket] = entry; |
| 190 | |
| 191 | if (oldEntryForKey == null) { |
| 192 | entry.prevInKeyInsertionOrder = lastInKeyInsertionOrder; |
| 193 | entry.nextInKeyInsertionOrder = null; |
| 194 | if (lastInKeyInsertionOrder == null) { |
| 195 | firstInKeyInsertionOrder = entry; |
| 196 | } else { |
| 197 | lastInKeyInsertionOrder.nextInKeyInsertionOrder = entry; |
| 198 | } |
| 199 | lastInKeyInsertionOrder = entry; |
| 200 | } else { |
| 201 | entry.prevInKeyInsertionOrder = oldEntryForKey.prevInKeyInsertionOrder; |
| 202 | if (entry.prevInKeyInsertionOrder == null) { |
| 203 | firstInKeyInsertionOrder = entry; |
| 204 | } else { |
| 205 | entry.prevInKeyInsertionOrder.nextInKeyInsertionOrder = entry; |
| 206 | } |
| 207 | entry.nextInKeyInsertionOrder = oldEntryForKey.nextInKeyInsertionOrder; |
| 208 | if (entry.nextInKeyInsertionOrder == null) { |
| 209 | lastInKeyInsertionOrder = entry; |
| 210 | } else { |
| 211 | entry.nextInKeyInsertionOrder.prevInKeyInsertionOrder = entry; |
| 212 | } |
| 213 | } |
| 214 | |
| 215 | size++; |
| 216 | modCount++; |
| 217 | } |
| 218 | |
| 219 | private BiEntry<K, V> seekByKey(@Nullable Object key, int keyHash) { |
| 220 | for (BiEntry<K, V> entry = hashTableKToV[keyHash & mask]; |
no outgoing calls
no test coverage detected