TypeK
- the type of keys maintained by this mapTypeV
- the type of mapped valuespublic class Hashtable<K,V> extends NonBlockingHashtable<K,V>
Hashtable
. This version
is based on NonBlockingHashMap
. The
undocumented iteration order is different from Hashtable, as is the
undocumented (lack of) synchronization. Programs that rely on this
undocumented behavior may break. Otherwise this solution should be
completely compatible, including the serialized forms.
This version is not synchronized, and correctly operates
as a thread-safe Hashtable. It does not provide the
same ordering guarantees as calling synchronized methods will. The old
Hashtable's methods were synchronized and would provide ordering. This
behavior is not part of Hashtable's spec. This version's methods are not
synchronized and will not force the same Java Memory Model orderings.Constructor and Description |
---|
Hashtable() |
Hashtable(int initialCapacity) |
Hashtable(int initialCapacity,
float loadFactor) |
Hashtable(Map<? extends K,? extends V> t) |
clear, clone, contains, containsKey, containsValue, elements, entrySet, get, initialize, isEmpty, keys, keySet, print, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, reprobes, size, toString, values
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
Copyright © 2019. All rights reserved.