线程安全
类继承关系:extends Dictionary<K,V> implements Map<K,V>, Cloneable, Serializable
属性:与HashMap一样,就不介绍了
private transient Entry<
K
,
V>[]
table
;
private transient int
count
;
private int
threshold
;
private float
loadFactor
;
private transient int
modCount =
0
;
private static final long
serialVersionUID =
1421746759512286392L
;
static final int
ALTERNATIVE_HASHING_THRESHOLD_DEFAULT = Integer.
MAX_VALUE
;
transient int
hashSeed
;
不同点:
1.方法用
synchronized修饰
2.index计算方法:
int index = (hash &
0x7FFFFFFF) % tab.
length
;
3.key和value不能为空
被ConcurrentHashMap取代的节奏