List now implements various forms of add()

This commit is contained in:
Eric Scharff
2007-09-26 10:32:39 -06:00
parent 219e381def
commit 4d3fd38d54
5 changed files with 29 additions and 0 deletions

View File

@ -26,6 +26,10 @@ public class Vector<T> implements List<T> {
return list.contains(element);
}
public synchronized void add(int index, T element) {
list.add(index, element);
}
public synchronized boolean add(T element) {
return list.add(element);
}