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

@ -26,6 +26,10 @@ public class WeakHashMap<K, V> implements Map<K, V> {
}
}
public boolean isEmpty() {
return map.isEmpty();
}
public int size() {
return map.size();
}
@ -50,6 +54,10 @@ public class WeakHashMap<K, V> implements Map<K, V> {
return map.put(key, value);
}
public void putAll(Map<? extends K,? extends V> elts) {
map.putAll(elts);
}
public V remove(K key) {
poll();
return map.remove(key);