Type Aliasswift 6.0.1Swift
Iterator
typealias Iterator = AnyIterator<Element>
Other members in extension
Typealiases
Type members
init(AnyCollection<Element>
) Creates an
AnyCollection
having the same underlying collection asother
.init<C>(C
) Creates a type-erased collection that wraps the given collection.
init<C>(C
) Creates a type-erased collection that wraps the given collection.
init<C>(C
) Creates a type-erased collection that wraps the given collection.
init(AnyRandomAccessCollection<Element>
) Creates an
AnyCollection
having the same underlying collection asother
.init(AnyBidirectionalCollection<Element>
) Creates an
AnyCollection
having the same underlying collection asother
.
Instance members
var count: Int
The number of elements.
var endIndex: AnyCollection<Element>.Index
The collection’s “past the end” position—that is, the position one greater than the last valid subscript argument.
var startIndex: AnyCollection<Element>.Index
The position of the first element in a non-empty collection.
var underestimatedCount: Int
subscript(Range<AnyCollection<Element>.Index>
) -> AnyCollection<Element>.SubSequence subscript(AnyCollection<Element>.Index
) -> Element Accesses the element indicated by
position
.func distance(from: AnyCollection<Element>.Index, to: AnyCollection<Element>.Index
) -> Int func drop(while: (Element) throws -> Bool
) rethrows -> AnyCollection<Element> func dropFirst(Int
) -> AnyCollection<Element> func dropLast(Int
) -> AnyCollection<Element> func filter((Element) throws -> Bool
) rethrows -> [Element] func forEach((Element) throws -> Void
) rethrows func formIndex(inout AnyCollection<Element>.Index, offsetBy: Int
) func formIndex(inout AnyCollection<Element>.Index, offsetBy: Int, limitedBy: AnyCollection<Element>.Index
) -> Bool func formIndex(after: inout AnyCollection<Element>.Index
) func index(AnyCollection<Element>.Index, offsetBy: Int
) -> AnyCollection<Element>.Index func index(AnyCollection<Element>.Index, offsetBy: Int, limitedBy: AnyCollection<Element>.Index
) -> AnyCollection<Element>.Index? func index(after: AnyCollection<Element>.Index
) -> AnyCollection<Element>.Index func makeIterator(
) -> AnyCollection<Element>.Iterator Returns an iterator over the elements of this collection.
func map<T, E>((Element)
throws func prefix(Int
) -> AnyCollection<Element> func prefix(while: (Element) throws -> Bool
) rethrows -> AnyCollection<Element> func suffix(Int
) -> AnyCollection<Element>