+2000-07-20 Tom Tromey <tromey@cygnus.com>
+
+ * java/util/Vector.java (remove(Object)): Implemented.
+
2000-07-19 Jeff Sturm <jeff.sturm@appnet.com>
* java/lang/natThrowable.cc (fillInStackTrace): Check for
// {
// }
- // TODO12:
- // public boolean remove(Object o)
- // {
- // }
+ public synchronized boolean remove(Object o)
+ {
+ for (int i = 0; i < elementCount; ++i)
+ {
+ if (o == null
+ ? elementData[i] == null
+ : o.equals (elementData[i]))
+ {
+ System.arraycopy (elementData, i, elementData, i + 1,
+ elementCount - i - 1);
+ return true;
+ }
+ }
+ return false;
+ }
// TODO12:
// public Object remove(int index)