@set


Description:

public bool @set (int index, owned T element)

Replaces the element at the specified index. Returns false if the index is out of bounds.

Example:

    var list = new ArrayList<string> (GLib.str_equal);
list.add ("hello");
assert (list.set (0, "world"));
assert (list.get (0) == "world");

Parameters:

index

the zero-based index.

element

the new element.

Returns:

true if the element was replaced, false if out of bounds.