subscript(_:)
Accesses the element at the specified index.
subscript(position: CircularBuffer<Element>.Index) -> Element { get set }
Parameters
- position
The position of the element to access.
position
must be a valid index of the collection that is not equal to theendIndex
property.
You can subscript CircularBuffer
with any valid index other than the CircularBuffer
‘s end index. The end index refers to the position one past the last element of a collection, so it doesn’t correspond with an element.