Implementing add(T element) in AbstractList, which just calls add(size(), element) and returns true per the spec.

This commit is contained in:
Mike Keesey 2012-07-23 18:55:11 -06:00
parent 265ab63e19
commit b4ecec3034

View File

@ -15,6 +15,11 @@ public abstract class AbstractList<T> extends AbstractCollection<T>
{
protected int modCount;
public boolean add(T o) {
add(size(), o);
return true;
}
public Iterator<T> iterator() {
return listIterator();
}