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

@ -11,6 +11,13 @@ public class Vector<T> implements List<T> {
this(0);
}
public Vector(List<T> list) {
this(list.size());
for (T o : list) {
add(o);
}
}
public synchronized int size() {
return list.size();
}
@ -39,6 +46,14 @@ public class Vector<T> implements List<T> {
return list.remove(index);
}
public synchronized boolean isEmpty() {
return list.isEmpty();
}
public synchronized <S> S[] toArray(S[] a) {
return list.toArray(a);
}
public T removeElementAt(int index) {
return remove(index);
}