src/share/classes/com/sun/corba/se/impl/util/IdentityHashtable.java

Print this page
rev 597 : 8047722: @since tag cleanup in corba
Reviewed-by:

*** 70,80 **** * @param initialCapacity the initial capacity of the hashtable. * @param loadFactor a number between 0.0 and 1.0. * @exception IllegalArgumentException if the initial capacity is less * than or equal to zero, or if the load factor is less than * or equal to zero. ! * @since JDK1.0 */ public IdentityHashtable(int initialCapacity, float loadFactor) { if ((initialCapacity <= 0) || (loadFactor <= 0.0)) { throw new IllegalArgumentException(); } --- 70,80 ---- * @param initialCapacity the initial capacity of the hashtable. * @param loadFactor a number between 0.0 and 1.0. * @exception IllegalArgumentException if the initial capacity is less * than or equal to zero, or if the load factor is less than * or equal to zero. ! * @since 1.0 */ public IdentityHashtable(int initialCapacity, float loadFactor) { if ((initialCapacity <= 0) || (loadFactor <= 0.0)) { throw new IllegalArgumentException(); }
*** 86,127 **** /** * Constructs a new, empty hashtable with the specified initial capacity * and default load factor. * * @param initialCapacity the initial capacity of the hashtable. ! * @since JDK1.0 */ public IdentityHashtable(int initialCapacity) { this(initialCapacity, 0.75f); } /** * Constructs a new, empty hashtable with a default capacity and load * factor. * ! * @since JDK1.0 */ public IdentityHashtable() { this(101, 0.75f); } /** * Returns the number of keys in this hashtable. * * @return the number of keys in this hashtable. ! * @since JDK1.0 */ public int size() { return count; } /** * Tests if this hashtable maps no keys to values. * * @return <code>true</code> if this hashtable maps no keys to values; * <code>false</code> otherwise. ! * @since JDK1.0 */ public boolean isEmpty() { return count == 0; } --- 86,127 ---- /** * Constructs a new, empty hashtable with the specified initial capacity * and default load factor. * * @param initialCapacity the initial capacity of the hashtable. ! * @since 1.0 */ public IdentityHashtable(int initialCapacity) { this(initialCapacity, 0.75f); } /** * Constructs a new, empty hashtable with a default capacity and load * factor. * ! * @since 1.0 */ public IdentityHashtable() { this(101, 0.75f); } /** * Returns the number of keys in this hashtable. * * @return the number of keys in this hashtable. ! * @since 1.0 */ public int size() { return count; } /** * Tests if this hashtable maps no keys to values. * * @return <code>true</code> if this hashtable maps no keys to values; * <code>false</code> otherwise. ! * @since 1.0 */ public boolean isEmpty() { return count == 0; }
*** 129,139 **** * Returns an enumeration of the keys in this hashtable. * * @return an enumeration of the keys in this hashtable. * @see java.util.Enumeration * @see java.util.Hashtable#elements() ! * @since JDK1.0 */ public Enumeration keys() { return new IdentityHashtableEnumerator(table, true); } --- 129,139 ---- * Returns an enumeration of the keys in this hashtable. * * @return an enumeration of the keys in this hashtable. * @see java.util.Enumeration * @see java.util.Hashtable#elements() ! * @since 1.0 */ public Enumeration keys() { return new IdentityHashtableEnumerator(table, true); }
*** 143,153 **** * sequentially. * * @return an enumeration of the values in this hashtable. * @see java.util.Enumeration * @see java.util.Hashtable#keys() ! * @since JDK1.0 */ public Enumeration elements() { return new IdentityHashtableEnumerator(table, false); } --- 143,153 ---- * sequentially. * * @return an enumeration of the values in this hashtable. * @see java.util.Enumeration * @see java.util.Hashtable#keys() ! * @since 1.0 */ public Enumeration elements() { return new IdentityHashtableEnumerator(table, false); }
*** 160,170 **** * @return <code>true</code> if some key maps to the * <code>value</code> argument in this hashtable; * <code>false</code> otherwise. * @exception NullPointerException if the value is <code>null</code>. * @see java.util.Hashtable#containsKey(java.lang.Object) ! * @since JDK1.0 */ public boolean contains(Object value) { if (value == null) { throw new NullPointerException(); } --- 160,170 ---- * @return <code>true</code> if some key maps to the * <code>value</code> argument in this hashtable; * <code>false</code> otherwise. * @exception NullPointerException if the value is <code>null</code>. * @see java.util.Hashtable#containsKey(java.lang.Object) ! * @since 1.0 */ public boolean contains(Object value) { if (value == null) { throw new NullPointerException(); }
*** 185,195 **** * * @param key possible key. * @return <code>true</code> if the specified object is a key in this * hashtable; <code>false</code> otherwise. * @see java.util.Hashtable#contains(java.lang.Object) ! * @since JDK1.0 */ public boolean containsKey(Object key) { IdentityHashtableEntry tab[] = table; int hash = System.identityHashCode(key); int index = (hash & 0x7FFFFFFF) % tab.length; --- 185,195 ---- * * @param key possible key. * @return <code>true</code> if the specified object is a key in this * hashtable; <code>false</code> otherwise. * @see java.util.Hashtable#contains(java.lang.Object) ! * @since 1.0 */ public boolean containsKey(Object key) { IdentityHashtableEntry tab[] = table; int hash = System.identityHashCode(key); int index = (hash & 0x7FFFFFFF) % tab.length;
*** 207,217 **** * @param key a key in the hashtable. * @return the value to which the key is mapped in this hashtable; * <code>null</code> if the key is not mapped to any value in * this hashtable. * @see java.util.Hashtable#put(java.lang.Object, java.lang.Object) ! * @since JDK1.0 */ public Object get(Object key) { IdentityHashtableEntry tab[] = table; int hash = System.identityHashCode(key); int index = (hash & 0x7FFFFFFF) % tab.length; --- 207,217 ---- * @param key a key in the hashtable. * @return the value to which the key is mapped in this hashtable; * <code>null</code> if the key is not mapped to any value in * this hashtable. * @see java.util.Hashtable#put(java.lang.Object, java.lang.Object) ! * @since 1.0 */ public Object get(Object key) { IdentityHashtableEntry tab[] = table; int hash = System.identityHashCode(key); int index = (hash & 0x7FFFFFFF) % tab.length;
*** 227,237 **** * Rehashes the contents of the hashtable into a hashtable with a * larger capacity. This method is called automatically when the * number of keys in the hashtable exceeds this hashtable's capacity * and load factor. * ! * @since JDK1.0 */ protected void rehash() { int oldCapacity = table.length; IdentityHashtableEntry oldTable[] = table; --- 227,237 ---- * Rehashes the contents of the hashtable into a hashtable with a * larger capacity. This method is called automatically when the * number of keys in the hashtable exceeds this hashtable's capacity * and load factor. * ! * @since 1.0 */ protected void rehash() { int oldCapacity = table.length; IdentityHashtableEntry oldTable[] = table;
*** 268,278 **** * @return the previous value of the specified key in this hashtable, * or <code>null</code> if it did not have one. * @exception NullPointerException if the key or value is * <code>null</code>. * @see java.util.Hashtable#get(java.lang.Object) ! * @since JDK1.0 */ public Object put(Object key, Object value) { // Make sure the value is not null if (value == null) { throw new NullPointerException(); --- 268,278 ---- * @return the previous value of the specified key in this hashtable, * or <code>null</code> if it did not have one. * @exception NullPointerException if the key or value is * <code>null</code>. * @see java.util.Hashtable#get(java.lang.Object) ! * @since 1.0 */ public Object put(Object key, Object value) { // Make sure the value is not null if (value == null) { throw new NullPointerException();
*** 312,322 **** * hashtable. This method does nothing if the key is not in the hashtable. * * @param key the key that needs to be removed. * @return the value to which the key had been mapped in this hashtable, * or <code>null</code> if the key did not have a mapping. ! * @since JDK1.0 */ public Object remove(Object key) { IdentityHashtableEntry tab[] = table; int hash = System.identityHashCode(key); int index = (hash & 0x7FFFFFFF) % tab.length; --- 312,322 ---- * hashtable. This method does nothing if the key is not in the hashtable. * * @param key the key that needs to be removed. * @return the value to which the key had been mapped in this hashtable, * or <code>null</code> if the key did not have a mapping. ! * @since 1.0 */ public Object remove(Object key) { IdentityHashtableEntry tab[] = table; int hash = System.identityHashCode(key); int index = (hash & 0x7FFFFFFF) % tab.length;
*** 335,345 **** } /** * Clears this hashtable so that it contains no keys. * ! * @since JDK1.0 */ public void clear() { IdentityHashtableEntry tab[] = table; for (int index = tab.length; --index >= 0; ) tab[index] = null; --- 335,345 ---- } /** * Clears this hashtable so that it contains no keys. * ! * @since 1.0 */ public void clear() { IdentityHashtableEntry tab[] = table; for (int index = tab.length; --index >= 0; ) tab[index] = null;
*** 348,358 **** /** * Returns a rather long string representation of this hashtable. * * @return a string representation of this hashtable. ! * @since JDK1.0 */ public String toString() { int max = size() - 1; StringBuffer buf = new StringBuffer(); Enumeration k = keys(); --- 348,358 ---- /** * Returns a rather long string representation of this hashtable. * * @return a string representation of this hashtable. ! * @since 1.0 */ public String toString() { int max = size() - 1; StringBuffer buf = new StringBuffer(); Enumeration k = keys();