@Override
	public void add(int index, E elem)	{
		checkIndexAdd(index);
		doAdd(index, elem);
	}
This method is called internally before elements are allocated or freed.
Override if you need to validity checks.
jphp-runtime/src/php/runtime/memory/support/IList.java