DoublyLinkedListItem
public class DoublyLinkedListItem<Element> where Element : Equatable
Individual Node of the DoublyLinkedList
-
Previous node
Declaration
Swift
private(set) public var prev: DoublyLinkedListItem<Element>? { get } -
Next node
Declaration
Swift
private(set) public var next: DoublyLinkedListItem<Element>? { get } -
Value of the node
Declaration
Swift
private(set) public var element: Element { get } -
Creates Node for
DoublyLinkedListwith provided parametersDeclaration
Swift
public init(prev: DoublyLinkedListItem?, next: DoublyLinkedListItem?, element: Element)Parameters
prevPrevious node from this node
nextNext node from this node
elementValue of this node
-
Updates the previous node item to the provided node
Declaration
Swift
public func updatePreviousElement(pointerTo newPrev: DoublyLinkedListItem<Element>?)Parameters
newPrevNew previous node, which will be replacing existing
-
Updates the next node item to the provided node
Declaration
Swift
public func updateNextElement(pointerTo newNext: DoublyLinkedListItem<Element>?)Parameters
newNextNew next node, which will be replacing existing
View on GitHub
DoublyLinkedListItem Class Reference