UNPKG

@launchmenu/core

Version:

An environment for visual keyboard controlled applets

37 lines 1.08 kB
import { IQueueNode } from "./search/_types/IQueueNode"; /** * A simple queue data type */ export declare class Queue<I> { protected head?: IQueueNode<I>; protected tail?: IQueueNode<I>; protected size: number; /** * Adds an item to the queue * @param item The item to be added * @returns THe created node which can be used to remove the item from the queue */ push(item: I): IQueueNode<I>; /** * Retrieves the first item in the queue * @returns The first item in the queue */ pop(): I | undefined; /** * Removes a given node from the queue * @param node The node to be removed * @returns Whether the node was still present */ removeNode(node: IQueueNode<I>): boolean; /** * Retrieves the size of this queue * @returns The size of the queue */ getSize(): number; /** * Checks whether the queue is empty or not * @returns Whether the queue is empty */ isEmpty(): boolean; } //# sourceMappingURL=Queue.d.ts.map