|
|
|
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
|
|
|
|
/* |
|
|
|
|
* Copyright 2002-2020 the original author or authors. |
|
|
|
|
* Copyright 2002-2021 the original author or authors. |
|
|
|
|
* |
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -299,7 +299,7 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen
@@ -299,7 +299,7 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
@Nullable |
|
|
|
|
public V remove(Object key) { |
|
|
|
|
public V remove(@Nullable Object key) { |
|
|
|
|
return doTask(key, new Task<V>(TaskOption.RESTRUCTURE_AFTER, TaskOption.SKIP_IF_EMPTY) { |
|
|
|
|
@Override |
|
|
|
|
@Nullable |
|
|
|
@ -316,7 +316,7 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen
@@ -316,7 +316,7 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean remove(Object key, final Object value) { |
|
|
|
|
public boolean remove(@Nullable Object key, final @Nullable Object value) { |
|
|
|
|
Boolean result = doTask(key, new Task<Boolean>(TaskOption.RESTRUCTURE_AFTER, TaskOption.SKIP_IF_EMPTY) { |
|
|
|
|
@Override |
|
|
|
|
protected Boolean execute(@Nullable Reference<K, V> ref, @Nullable Entry<K, V> entry) { |
|
|
|
@ -333,7 +333,7 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen
@@ -333,7 +333,7 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean replace(K key, final V oldValue, final V newValue) { |
|
|
|
|
public boolean replace(@Nullable K key, final @Nullable V oldValue, final @Nullable V newValue) { |
|
|
|
|
Boolean result = doTask(key, new Task<Boolean>(TaskOption.RESTRUCTURE_BEFORE, TaskOption.SKIP_IF_EMPTY) { |
|
|
|
|
@Override |
|
|
|
|
protected Boolean execute(@Nullable Reference<K, V> ref, @Nullable Entry<K, V> entry) { |
|
|
|
@ -349,7 +349,7 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen
@@ -349,7 +349,7 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
@Nullable |
|
|
|
|
public V replace(K key, final V value) { |
|
|
|
|
public V replace(@Nullable K key, final @Nullable V value) { |
|
|
|
|
return doTask(key, new Task<V>(TaskOption.RESTRUCTURE_BEFORE, TaskOption.SKIP_IF_EMPTY) { |
|
|
|
|
@Override |
|
|
|
|
@Nullable |
|
|
|
|