src/share/classes/java/util/Hashtable.java

Print this page
rev 10048 : 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
Reviewed-by:


 112  * implementations, {@code Hashtable} is synchronized.  If a
 113  * thread-safe implementation is not needed, it is recommended to use
 114  * {@link HashMap} in place of {@code Hashtable}.  If a thread-safe
 115  * highly-concurrent implementation is desired, then it is recommended
 116  * to use {@link java.util.concurrent.ConcurrentHashMap} in place of
 117  * {@code Hashtable}.
 118  *
 119  * @param <K> the type of keys maintained by this map
 120  * @param <V> the type of mapped values
 121  *
 122  * @author  Arthur van Hoff
 123  * @author  Josh Bloch
 124  * @author  Neal Gafter
 125  * @see     Object#equals(java.lang.Object)
 126  * @see     Object#hashCode()
 127  * @see     Hashtable#rehash()
 128  * @see     Collection
 129  * @see     Map
 130  * @see     HashMap
 131  * @see     TreeMap
 132  * @since JDK1.0
 133  */
 134 public class Hashtable<K,V>
 135     extends Dictionary<K,V>
 136     implements Map<K,V>, Cloneable, java.io.Serializable {
 137 
 138     /**
 139      * The hash table data.
 140      */
 141     private transient Entry<?,?>[] table;
 142 
 143     /**
 144      * The total number of entries in the hash table.
 145      */
 146     private transient int count;
 147 
 148     /**
 149      * The table is rehashed when its size exceeds this threshold.  (The
 150      * value of this field is (int)(capacity * loadFactor).)
 151      *
 152      * @serial




 112  * implementations, {@code Hashtable} is synchronized.  If a
 113  * thread-safe implementation is not needed, it is recommended to use
 114  * {@link HashMap} in place of {@code Hashtable}.  If a thread-safe
 115  * highly-concurrent implementation is desired, then it is recommended
 116  * to use {@link java.util.concurrent.ConcurrentHashMap} in place of
 117  * {@code Hashtable}.
 118  *
 119  * @param <K> the type of keys maintained by this map
 120  * @param <V> the type of mapped values
 121  *
 122  * @author  Arthur van Hoff
 123  * @author  Josh Bloch
 124  * @author  Neal Gafter
 125  * @see     Object#equals(java.lang.Object)
 126  * @see     Object#hashCode()
 127  * @see     Hashtable#rehash()
 128  * @see     Collection
 129  * @see     Map
 130  * @see     HashMap
 131  * @see     TreeMap
 132  * @since 1.0
 133  */
 134 public class Hashtable<K,V>
 135     extends Dictionary<K,V>
 136     implements Map<K,V>, Cloneable, java.io.Serializable {
 137 
 138     /**
 139      * The hash table data.
 140      */
 141     private transient Entry<?,?>[] table;
 142 
 143     /**
 144      * The total number of entries in the hash table.
 145      */
 146     private transient int count;
 147 
 148     /**
 149      * The table is rehashed when its size exceeds this threshold.  (The
 150      * value of this field is (int)(capacity * loadFactor).)
 151      *
 152      * @serial