@ Override public T set ( int index , T elem ) { /* Find out where to look. */ final int offset = computeOffset ( index ) ; final int arrIndex = computeIndex ( index ) ; /* Cache the value there and write the new one. */ T result = mArrays [ offset ] [ arrIndex ] ; mArrays [ offset ] [ arrIndex ] = elem ; /* Hand back the old value. */ return result ; }
Sets the element at the specified position to the indicated value . If the index is out of bounds throws an IndexOutOfBounds exception .