Make DefaultHashMap class final.
Change-Id: Ia651b5aa098b584559e5ef2556dcac3178da615b
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -21,10 +21,10 @@ import java.util.HashMap; | ... | @@ -21,10 +21,10 @@ import java.util.HashMap; |
21 | /** | 21 | /** |
22 | * HashMap that returns a default value for unmapped keys. | 22 | * HashMap that returns a default value for unmapped keys. |
23 | */ | 23 | */ |
24 | -public class DefaultHashMap<K, V> extends HashMap<K, V> { | 24 | +public final class DefaultHashMap<K, V> extends HashMap<K, V> { |
25 | 25 | ||
26 | /** Default value to return when no key binding exists. */ | 26 | /** Default value to return when no key binding exists. */ |
27 | - protected V defaultValue; | 27 | + protected final V defaultValue; |
28 | 28 | ||
29 | /** | 29 | /** |
30 | * Constructs an empty map with the given default value. | 30 | * Constructs an empty map with the given default value. | ... | ... |
-
Please register or login to post a comment