Queue
public class Queue<Element>
A standard queue (FIFO - First In First Out). Supports simultaneous adding and removing, but only one item can be added at a time, and only one item can be removed at a time. Not thread safe.
-
Undocumented
Declaration
Swift
public init() -
Enqueue a new item at the end of the queue.
Declaration
Swift
public func enqueue(_ value: Element)Parameters
valuenew value
-
Dequeue an item at the front of the queue.
Declaration
Swift
public func dequeue() -> Element?Return Value
value dequeued.
-
Undocumented
Declaration
Swift
public func isEmpty() -> Bool
Queue Class Reference