RandomAccessCollectionWrapping
public protocol RandomAccessCollectionWrapping : RandomAccessCollection
Interface for wrapping any RandomAccessCollection type. The RandomAccessCollection interface
is exposed, regardless of the concrete implementation of the wrapped type.
The performance guarantees made by the RandomAccessCollection are sustained.
-
Wrapped
RandomAccessCollection-conforming type.Declaration
Swift
associatedtype Base : RandomAccessCollection
-
Wrapped
RandomAccessCollection-conforming type.Declaration
Swift
var base: Base { get }
-
startIndexExtension methodStart index.
Complexity
O(1)Declaration
Swift
public var startIndex: Base.Index { get } -
endIndexExtension methodEnd index.
Complexity
O(1)Declaration
Swift
public var endIndex: Base.Index { get } -
firstExtension methodFirst element, if there is at least one element. Otherwise,
nil.Complexity
O(1)Declaration
Swift
public var first: Base.Element? { get } -
lastExtension methodLast element, if there is at least one element. Otherwise,
nil.Complexity
O(1)Declaration
Swift
public var last: Base.Element? { get } -
countExtension methodAmount of elements.
Complexity
O(1)Declaration
Swift
public var count: Int { get } -
isEmptyExtension methodComplexity
O(1)
Declaration
Swift
public var isEmpty: Bool { get }Return Value
trueif there are no elements contained herein. Otherwise,false. -
subscript(_:Extension method) -
index(after:Extension method) -
index(before:Extension method)
View on GitHub
Install in Dash
RandomAccessCollectionWrapping Protocol Reference