flesh out some classpath classes

This commit is contained in:
Joel Dice
2007-07-22 13:06:21 -06:00
parent ecd31a10a4
commit 472ecb1713
18 changed files with 320 additions and 92 deletions

View File

@ -15,6 +15,10 @@ public class Vector<T> implements List<T> {
return list.size();
}
public synchronized boolean contains(T element) {
return list.contains(element);
}
public synchronized boolean add(T element) {
return list.add(element);
}
@ -43,6 +47,12 @@ public class Vector<T> implements List<T> {
list.clear();
}
public synchronized void copyInto(Object[] array) {
for (int i = 0; i < size(); ++i) {
array[i] = list.get(i);
}
}
public Iterator<T> iterator() {
return new Collections.ArrayListIterator(this);
}