public IList<E> extractWhere(IPredicate<E> predicate) {
	    IList<E> list = doCreate(-1);
	    int size = size();
		for (int i=0; i<size; i++) {
			E e = doGet(i);
			if (predicate.test(e)) {
				list.add(e);
				doRemove(i);
				size--;
				i--;
			}
		}
		return list;
	}
Removes and returns all elements in the list which match the predicate.

@param predicate	predicate
@return			elements which have been removed from the list
jphp-runtime/src/php/runtime/memory/support/IList.java