@Override
    protected E doReSet(int index, E elem) {
        assert (index >= 0 && index < size);

        int physIdx = physIndex(index);
        E oldElem = values[physIdx];
        values[physIdx] = elem;
        return oldElem;
    }
Initialize all instance fields.

@param values	new values array
@param size		new size
jphp-runtime/src/php/runtime/memory/support/GapList.java