* java/util/AbstractMap.java: Re-merged with Classpath.
* java/util/IdentityHashMap.java: Re-merged with Classpath.
From-SVN: r45391
2001-09-04 Tom Tromey <tromey@redhat.com>
+ * java/util/AbstractMap.java: Re-merged with Classpath.
+ * java/util/IdentityHashMap.java: Re-merged with Classpath.
+
* java/text/SimpleDateFormat.java: Re-merged with Classpath.
* gnu/gcj/text/LocaleData.java, gnu/gcj/text/LocaleData_en.java,
gnu/gcj/text/LocaleData_en_US.java: Removed.
entrySet().clear();
}
+ /**
+ * Create a shallow copy of this Map, no keys or values are copied.
+ */
+ protected Object clone () throws CloneNotSupportedException
+ {
+ return super.clone ();
+ }
+
public boolean containsKey(Object key)
{
Object k;
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)