public IList<E> removeAll(E elem) {
	    IList<E> list = doCreate(-1);
	    int size = size();
		for (int i=0; i<size; i++) {
			E e = doGet(i);
			if (equalsElem(elem, e)) {
				list.add(e);
				doRemove(i);
				size--;
				i--;
			}
		}
		return list;
    }
Removes all equal elements.

@param elem	element
@return		removed equal elements (never null)
jphp-runtime/src/php/runtime/memory/support/IList.java