5 |
|
*/ |
6 |
|
|
7 |
|
package extra166y; |
8 |
+ |
|
9 |
|
import java.lang.ref.*; |
10 |
|
import java.lang.reflect.*; |
11 |
|
import java.io.*; |
111 |
|
* @param <K> the type of keys maintained by this map |
112 |
|
* @param <V> the type of mapped values |
113 |
|
*/ |
114 |
< |
public class CustomConcurrentHashMap<K, V> extends AbstractMap<K, V> |
115 |
< |
implements ConcurrentMap<K, V>, Serializable { |
114 |
> |
public class CustomConcurrentHashMap<K,V> extends AbstractMap<K,V> |
115 |
> |
implements ConcurrentMap<K,V>, Serializable { |
116 |
|
private static final long serialVersionUID = 7249069246764182397L; |
117 |
|
|
118 |
|
/* |
227 |
|
* A function computing a mapping from the given key to a value, |
228 |
|
* or {@code null} if there is no mapping. |
229 |
|
*/ |
230 |
< |
public static interface MappingFunction<K, V> { |
230 |
> |
public static interface MappingFunction<K,V> { |
231 |
|
/** |
232 |
|
* Returns a value for the given key, or null if there is no |
233 |
|
* mapping. If this function throws an (unchecked) exception, |
248 |
|
* current value to a new value, or {@code null} if there is |
249 |
|
* no mapping. |
250 |
|
*/ |
251 |
< |
public static interface RemappingFunction<K, V> { |
251 |
> |
public static interface RemappingFunction<K,V> { |
252 |
|
/** |
253 |
|
* Returns a new value for the given key and its current, or |
254 |
|
* null if there is no mapping. |
680 |
|
* Returns {@code true} if this map contains a key equivalent to |
681 |
|
* the given key with respect to this map's key Equivalence. |
682 |
|
* |
683 |
< |
* @param key possible key |
683 |
> |
* @param key possible key |
684 |
|
* @return {@code true} if this map contains the specified key |
685 |
|
* @throws NullPointerException if the specified key is null |
686 |
|
*/ |
698 |
|
* key with respect to this map's key Equivalence, or {@code null} |
699 |
|
* if no such mapping exists. |
700 |
|
* |
701 |
< |
* @param key possible key |
702 |
< |
* @return the value associated with the key or {@code null} if |
701 |
> |
* @param key possible key |
702 |
> |
* @return the value associated with the key, or {@code null} if |
703 |
|
* there is no mapping |
704 |
|
* @throws NullPointerException if the specified key is null |
705 |
|
*/ |