Replaces the element at the specified position in this list with the specified element (optional operation).
|index of the element to replace|
|element to be stored at the specified position|
| if the |
|if the class of the specified element prevents it from being added to this list|
|if the specified element is null and this list does not permit null elements|
|if some property of the specified element prevents it from being added to this list|
| if the index is out of range