MCPcopy Index your code
hub / github.com/wyouflf/xUtils3 / remove

Method remove

xutils/src/main/java/org/xutils/cache/LruCache.java:195–213  ·  view source on GitHub ↗

Removes the entry for key if it exists. @return the previous value mapped by key.

(K key)

Source from the content-addressed store, hash-verified

193 * @return the previous value mapped by {@code key}.
194 */
195 public final V remove(K key) {
196 if (key == null) {
197 throw new NullPointerException("key == null");
198 }
199
200 V previous;
201 synchronized (this) {
202 previous = map.remove(key);
203 if (previous != null) {
204 size -= safeSizeOf(key, previous);
205 }
206 }
207
208 if (previous != null) {
209 entryRemoved(false, key, previous, null);
210 }
211
212 return previous;
213 }
214
215 /**
216 * Called for entries that have been evicted or removed. This method is

Callers 6

trimToSizeMethod · 0.45
onFinishedMethod · 0.45
closeMethod · 0.45
removeTableMethod · 0.45
startDownloadMethod · 0.45
removeDownloadMethod · 0.45

Calls 2

safeSizeOfMethod · 0.95
entryRemovedMethod · 0.95

Tested by

no test coverage detected