< prev index next >

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

Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea

*** 178,188 **** * Constructs a new, empty hashtable with the specified initial * capacity and the specified load factor. * * @param initialCapacity the initial capacity of the hashtable. * @param loadFactor the load factor of the hashtable. ! * @exception IllegalArgumentException if the initial capacity is less * than zero, or if the load factor is nonpositive. */ public Hashtable(int initialCapacity, float loadFactor) { if (initialCapacity < 0) throw new IllegalArgumentException("Illegal Capacity: "+ --- 178,188 ---- * Constructs a new, empty hashtable with the specified initial * capacity and the specified load factor. * * @param initialCapacity the initial capacity of the hashtable. * @param loadFactor the load factor of the hashtable. ! * @throws IllegalArgumentException if the initial capacity is less * than zero, or if the load factor is nonpositive. */ public Hashtable(int initialCapacity, float loadFactor) { if (initialCapacity < 0) throw new IllegalArgumentException("Illegal Capacity: "+
*** 200,210 **** /** * Constructs a new, empty hashtable with the specified initial capacity * and default load factor (0.75). * * @param initialCapacity the initial capacity of the hashtable. ! * @exception IllegalArgumentException if the initial capacity is less * than zero. */ public Hashtable(int initialCapacity) { this(initialCapacity, 0.75f); } --- 200,210 ---- /** * Constructs a new, empty hashtable with the specified initial capacity * and default load factor (0.75). * * @param initialCapacity the initial capacity of the hashtable. ! * @throws IllegalArgumentException if the initial capacity is less * than zero. */ public Hashtable(int initialCapacity) { this(initialCapacity, 0.75f); }
*** 302,312 **** * @param value a value to search for * @return {@code true} if and only if some key maps to the * {@code value} argument in this hashtable as * determined by the {@code equals} method; * {@code false} otherwise. ! * @exception NullPointerException if the value is {@code null} */ public synchronized boolean contains(Object value) { if (value == null) { throw new NullPointerException(); } --- 302,312 ---- * @param value a value to search for * @return {@code true} if and only if some key maps to the * {@code value} argument in this hashtable as * determined by the {@code equals} method; * {@code false} otherwise. ! * @throws NullPointerException if the value is {@code null} */ public synchronized boolean contains(Object value) { if (value == null) { throw new NullPointerException(); }
*** 463,473 **** * * @param key the hashtable key * @param value the value * @return the previous value of the specified key in this hashtable, * or {@code null} if it did not have one ! * @exception NullPointerException if the key or value is * {@code null} * @see Object#equals(Object) * @see #get(Object) */ public synchronized V put(K key, V value) { --- 463,473 ---- * * @param key the hashtable key * @param value the value * @return the previous value of the specified key in this hashtable, * or {@code null} if it did not have one ! * @throws NullPointerException if the key or value is * {@code null} * @see Object#equals(Object) * @see #get(Object) */ public synchronized V put(K key, V value) {
< prev index next >