indexReplace
Replaces the existing equivalent key with the given one and returns any previous value stored for that key.
Return
Returns the previous key stored in the set.
Parameters
index
The index of an existing key.
equivalentKey
The key to put in the set as a replacement. Must be equivalent to the key currently stored at the provided index.
See also
.indexOf
Throws
If assertions are enabled and the index does not correspond to an existing key.