LinkedList

public struct LinkedList<ELEMENT>
extension LinkedList: Sequence
extension LinkedList: Collection
extension LinkedList: MutableCollection
extension LinkedList: BidirectionalCollection
extension LinkedList: RangeReplaceableCollection
extension LinkedList: ExpressibleByArrayLiteral
extension LinkedList: CustomStringConvertible
extension LinkedList: Equatable where ELEMENT: Equatable

Undocumented

  • Declaration

    Swift

    public private(set) var count: Int { get }
  • Declaration

    Swift

    public init()

Initializers

  • Declaration

    Swift

    init<S>(_ sequence: S) where ELEMENT == S.Element, S : Sequence

Computed Properties

  • Undocumented

    Declaration

    Swift

    var head: Element? { get }
  • Undocumented

    Declaration

    Swift

    var tail: Element? { get }

Sequence Conformance

  • Undocumented

    Declaration

    Swift

    public typealias ELEMENT = Element
  • Declaration

    Swift

    public  func makeIterator() -> Iterator
  • Declaration

    Swift

    public struct Iterator : IteratorProtocol

Collection Conformance

  • Declaration

    Swift

    public var startIndex: Index { get }
  • Declaration

    Swift

    public var endIndex: Index { get }
  • Undocumented

    Declaration

    Swift

    public var first: Element? { get }
  • Declaration

    Swift

    public var isEmpty: Bool { get }
  • Declaration

    Swift

    public func index(after i: Index) -> Index
  • Declaration

    Swift

    public struct Index : Comparable

MutableCollection Conformance

LinkedList Specific Operations

  • Undocumented

    Declaration

    Swift

    mutating func prepend(_ newElement: Element)
  • Undocumented

    Declaration

    Swift

    mutating func prepend<S>(contentsOf newElements: S) where ELEMENT == S.Element, S : Sequence
  • Undocumented

    Declaration

    Swift

    @discardableResult
    mutating func popFirst() -> Element?
  • Undocumented

    Declaration

    Swift

    @discardableResult
    mutating func popLast() -> Element?

BidirectionalCollection Conformance

  • Undocumented

    Declaration

    Swift

    public var last: Element? { get }
  • Declaration

    Swift

    public func index(before i: Index) -> Index

RangeReplaceableCollection Conformance

  • Declaration

    Swift

    public mutating func append<S>(contentsOf newElements: S) where ELEMENT == S.Element, S : Sequence
  • Declaration

    Swift

    public mutating func replaceSubrange<S, R>(_ subrange: R, with newElements: S) where ELEMENT == S.Element, S : Sequence, R : RangeExpression, R.Bound == LinkedList<ELEMENT>.Index

ExpressibleByArrayLiteral Conformance

CustomStringConvertible Conformance

  • Declaration

    Swift

    public var description: String { get }

Available where ELEMENT: Equatable

  • Declaration

    Swift

    public static func == (lhs: LinkedList<Element>, rhs: LinkedList<Element>) -> Bool