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, parent) => boolean);
}

Implemented by

Properties

getSize: (() => number)

The number of links in the queue.

Type declaration

    • (): number
    • Returns number

isEmpty: (() => boolean)

If no links are in the queue.

Type declaration

    • (): boolean
    • Returns boolean

peek: (() => undefined | ILink)

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

Type declaration

pop: (() => undefined | ILink)

Get and remove the next link from the queue.

Type declaration

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

Add the given link to the queue.

Type declaration

    • (link, parent): boolean
    • Parameters

      • link: ILink

        A link.

      • parent: ILink

        The parent in which the given link was discovered.

      Returns boolean

Returns

If the link was added to the queue.