void doTransfer(int transferMode, int srcIndex, int srcLen, IList<? super E> dst, int dstIndex, int dstLen) {
    	// Prepare arguments
    	if (srcLen == -1) {
    		srcLen = size()-srcIndex;
    	}
        checkRange(srcIndex, srcLen);
        if (dstIndex == -1) {
        	dstIndex = dst.size();
        } else {
            dst.checkIndexAdd(dstIndex);
        }
        if (dstLen == -1) {
        	dstLen = dst.size() - dstIndex;
        } else {
        	dst.checkLength(dstLen);
        }

        E defaultElem = getDefaultElem();
        if (dstLen > srcLen) {
        	// Remove elements from destination because the source range is smaller than the destination range
        	dst.remove(dstIndex, dstLen-srcLen);
        } else if (srcLen > dstLen) {
        	// Add elements to destination because the source range is larger than the destination range
        	dst.addMult(dstIndex, srcLen-dstLen, defaultElem);
        }

        // Overwrite the range starting at dstIndex with length srcIndex in dst
        if (transferMode == TRANSFER_MOVE) {
        	// Move
    		for (int i=0; i<srcLen; i++) {
    			E elem = doReSet(srcIndex+i, defaultElem);
    			dst.doSet(dstIndex+i, elem);
    		}
        } else {
            // Copy / Remove
        	for (int i=0; i<srcLen; i++) {
        		E elem = doGet(srcIndex+i);
        		dst.doSet(dstIndex+i, elem);
        	}
        	if (transferMode == TRANSFER_REMOVE) {
        		// Remove
        		remove(srcIndex, srcLen);
        	}
        }
	}
Moves elements from one list to another by removing it from the source list.
So the size of source list will change.
The elements in the specified range in the destination list are removed and
the elements specified to be moved are inserted.

If source and destination list are identical, the method behaves like {@link #drag(int, int, int)}.

@param src		source list
@param srcIndex	index of first element in source list
@param srcLen	number of elements to copy
@param dst		destination list
@param dstIndex	index of first element in destination list
@param dstLen	number of elements to replace in destination list
@param <E> 		type of elements stored in the list
@throws 			IndexOutOfBoundsException if the ranges are invalid
jphp-runtime/src/php/runtime/memory/support/IList.java