A datastructure that accepts links, and emits them in an implementation-defined order.

interface ILinkQueue {
    getSize: () => number;
    isEmpty: () => boolean;
    peek: () => undefined | ILink;
    pop: () => undefined | ILink;
    push: (link: ILink, parent: ILink) => boolean;
}

Implemented by

Properties

getSize: () => number

The number of links in the queue.

isEmpty: () => boolean

If no links are in the queue.

peek: () => undefined | ILink

Get (but not remove) the next link from the queue.

pop: () => undefined | ILink

Get and remove the next link from the queue.

push: (link: ILink, parent: ILink) => boolean

Add the given link to the queue.

Type declaration

    • (link: ILink, parent: ILink): boolean
    • Parameters

      • link: ILink

        A link.

      • parent: ILink

        The parent in which the given link was discovered.

      Returns boolean

      If the link was added to the queue.