public void reverse(int index, int len) {
    	checkRange(index, len);

    	int pos1 = index;
		int pos2 = index+len-1;
    	int mid = len / 2;
    	for (int i=0; i<mid; i++) {
    		E swap = doGet(pos1);
    		swap = doReSet(pos2, swap);
    		doReSet(pos1, swap);
    		pos1++;
    		pos2--;
    	}
    }
Reverses the order of the specified elements in the list.

@param index	index of first element to reverse
@param len	number of elements to reverse
@throws 			IndexOutOfBoundsException if the ranges are invalid
jphp-runtime/src/php/runtime/memory/support/IList.java