AbstractMap.java: Re-merged with Classpath.

* java/util/AbstractMap.java: Re-merged with Classpath.
	* java/util/IdentityHashMap.java: Re-merged with Classpath.

From-SVN: r45391
This commit is contained in:
Tom Tromey 2001-09-05 00:14:15 +00:00 committed by Tom Tromey
parent a1f4e5ed0a
commit ef671f4175
3 changed files with 25 additions and 3 deletions

View file

@ -83,11 +83,22 @@ public class IdentityHashMap extends AbstractMap
size = 0;
}
/**
* Creates a shallow copy where keys and values are not cloned.
*/
public Object clone ()
{
IdentityHashMap copy = (IdentityHashMap) super.clone ();
copy.table = (Object[]) table.clone ();
return copy;
try
{
IdentityHashMap copy = (IdentityHashMap) super.clone ();
copy.table = (Object[]) table.clone ();
return copy;
}
catch (CloneNotSupportedException e)
{
// Can't happen.
return null;
}
}
public boolean containsKey (Object key)