EmptyCollection

struct EmptyCollection<T>

A collection whose element type is T but that is always empty.

Inheritance CollectionType, Reflectable, SequenceType, _CollectionType, _SequenceType, _Sequence_Type View Protocol Hierarchy →
Associated Types
Index = Int

A type that represents a valid position in the collection.

Valid indices consist of the position of every element and a "past the end" position that's not valid for use as a subscript.

Generator = EmptyGenerator<T>

Type alias inferred.

Element = T

Type alias inferred.

Index = Index

Type alias inferred.

SubSequence = Slice<EmptyCollection<T>>

Type alias inferred.

Import import Swift

Initializers

init()

Construct an instance.

Declaration

init()

Instance Variables

var endIndex: Index

Always zero, just like startIndex.

Declaration

var endIndex: Index { get }
var startIndex: Index

Always zero, just like endIndex.

Declaration

var startIndex: Index { get }

Subscripts

subscript(_: Index)

Declaration

subscript(position: Index) -> T { get }

Instance Methods

func generate()

Returns an empty generator.

Complexity: O(1)

Declaration

func generate() -> EmptyGenerator<T>
func getMirror()

Returns a mirror that reflects self.

Declaration

func getMirror() -> MirrorType