public struct Sampling<Base: Collection, Selection: Collection>
where Selection.Element == Base.Index
extension Sampling: SamplingProtocol
extension Sampling: Collection
extension Sampling: BidirectionalCollection
where Selection: BidirectionalCollection
extension Sampling: RandomAccessCollection
where Selection: RandomAccessCollection
การเลือกองค์ประกอบอย่างเกียจคร้าน ตามลำดับที่กำหนด จากคอลเลกชันฐานบางส่วน
สร้างอินสแตนซ์จาก
base
และselection
คำประกาศ
public init(base: Base, selection: Selection)
คำประกาศ
public typealias Element = Base.Element
ประเภทที่อินสแตนซ์แสดงถึงตำแหน่งใน
self
คำประกาศ
public typealias Index = Selection.Index
ตำแหน่งขององค์ประกอบแรก
คำประกาศ
public var startIndex: Index { get }
ตำแหน่งที่หนึ่งผ่านองค์ประกอบสุดท้าย
คำประกาศ
public var endIndex: Index { get }