set

open operator override fun set(index: Int, element: Segment): Segment

Replaces a segment at the specified index in the part. The points of the part can change if the input segment is not coincident with the start and end points of the segment that's being replaced.

Return

the segment that was replaced.

Since

200.1.0

Parameters

index

Zero-based index of the segment.

element

The segment to be set into the collection.

Throws

if index is out of range.