Changes the position the element found at the specified position in the specified vector.

When both fromIndex and toIndex are >= 0 and < the vector size, the function acts the same as the following expression:


v.addElement (
  v.removeElement (fromIndex)
  toIndex
)
Otherwise, it does nothing.

Parameters:

v

The vector object.

Note: The null value passed in this parameter will cause doing nothing.

fromIndex
The index of the element to be moved.
toIndex
The new index of the element.

Note: When either of the specified indexes is < 0 or >= the vector size, the function does nothing.

Returns:

The same vector (or null value) as passed in 'v' parameter

See Also:

addElement(), removeElement()