Added methods isEmpty(), putAll(), toArray() to interfaces List and Map

This commit is contained in:
Eric Scharff
2007-09-26 08:57:34 -06:00
parent 4ae4221701
commit b02b98609e
10 changed files with 115 additions and 1 deletions

View File

@ -15,6 +15,10 @@ public class Hashtable<K, V> implements Map<K, V> {
return map.toString();
}
public synchronized boolean isEmpty() {
return map.isEmpty();
}
public synchronized int size() {
return map.size();
}
@ -35,6 +39,10 @@ public class Hashtable<K, V> implements Map<K, V> {
return map.put(key, value);
}
public synchronized void putAll(Map<? extends K,? extends V> elts) {
map.putAll(elts);
}
public synchronized V remove(K key) {
return map.remove(key);
}